/** * @return only permanent head sort columns */ public List<IColumn<?>> getPermanentHeadSortColumns() { return CollectionUtility.arrayList(m_permanentHeadSortColumns); }
@Override public List<BookmarkChangedClientNotification> coalesce(List<BookmarkChangedClientNotification> notifications) { // reduce to one return CollectionUtility.arrayList(CollectionUtility.firstElement(notifications)); }
@Override public String toString() { return "RequestHistory: lastProcessedRequestSequenceNo=" + m_lastProcessedRequestSequenceNo + ", missingRequestSequenceNos=[" + CollectionUtility.format(m_missingRequestSequenceNos) + "]"; } }
protected Set<TileGridMenuType> getMenuTypesForSelection(List<? extends ITile> selection) { if (CollectionUtility.isEmpty(selection)) { return CollectionUtility.hashSet(TileGridMenuType.EmptySpace); } else if (CollectionUtility.size(selection) == 1) { return CollectionUtility.hashSet(TileGridMenuType.SingleSelection); } else { return CollectionUtility.hashSet(TileGridMenuType.MultiSelection); } } }
public PlannerEvent(IPlanner source, int type, List<? extends Resource> resources) { super(source); m_type = type; if (CollectionUtility.hasElements(resources)) { m_resources = CollectionUtility.arrayList(resources); } }
public TableRow(ColumnSet columnSet, List<?> values) { this(columnSet); if (CollectionUtility.hasElements(values)) { for (int i = 0; i < values.size(); i++) { Cell cell = getCellForUpdate(i); cell.setValue(values.get(i)); } } }
@Override public ITableRow getSelectedRow() { return CollectionUtility.firstElement(m_selectedRows); }
@Override public ITreeNode findNode(Object primaryKey) { Collection<ITreeNode> a = findNodes(CollectionUtility.hashSet(primaryKey)); if (a != null && !a.isEmpty()) { return CollectionUtility.firstElement(a); } else { return null; } }
@Override public void exportFormFieldData(AbstractFormFieldData target) { @SuppressWarnings("unchecked") AbstractValueFieldData<Set<KEY>> v = (AbstractValueFieldData<Set<KEY>>) target; Set<KEY> value = getValue(); if (CollectionUtility.isEmpty(value)) { v.setValue(null); } else { v.setValue(CollectionUtility.hashSet(this.getValue())); } }
@Override public void consumeBinaryResource(List<BinaryResource> binaryResources, Map<String, String> uploadProperties) { if (!CollectionUtility.isEmpty(binaryResources)) { getModel().setValue(CollectionUtility.firstElement(binaryResources)); } }
@Override public void selectResources(List<? extends Resource<RI>> resources) { setPlannerChanging(true); try { List<Resource<RI>> newSelection = new ArrayList<>(resources); if (newSelection.size() > 1 && !isMultiSelectResources()) { Resource<RI> first = newSelection.get(0); newSelection.clear(); newSelection.add(first); } if (!CollectionUtility.equalsCollection(m_selectedResources, newSelection, false)) { m_selectedResources = new ArrayList<>(newSelection); List<Resource<RI>> notificationCopy = CollectionUtility.arrayList(m_selectedResources); fireResourcesSelected(notificationCopy); } } finally { setPlannerChanging(false); } }
protected IFormField getTreeBoxFilterBoxModel() { List<IFormField> childFields = getModel().getFields(); if (CollectionUtility.hasElements(childFields)) { return CollectionUtility.firstElement(childFields); } return null; } }
@Override public boolean isActive() { return !CollectionUtility.isEmpty(m_remoteUrls); }
@Override public Map<String, Object> getSharedVariableMap() { return CollectionUtility.copyMap(m_sharedVariableMap); }
@Override public void selectTiles(List<T> tiles) { if (!isSelectable()) { setSelectedTiles(new ArrayList<>()); return; } List<T> newSelection = filterTiles(tiles); if (newSelection.size() > 1 && !isMultiSelect()) { T first = newSelection.get(0); newSelection.clear(); newSelection.add(first); } if (!CollectionUtility.equalsCollection(getSelectedTilesInternal(), newSelection, false)) { setSelectedTiles(newSelection); } }
if (CollectionUtility.equalsCollection(checkedRows, condition.getCheckedRows()) && CollectionUtility.equalsCollection(uncheckedRows, condition.getUncheckedRows())) { rows = CollectionUtility.combine(checkedRows, uncheckedRows); TableEvent newEvent = new TableEvent(m_jsonTable.getModel(), event.getType(), rows); return newEvent; if (CollectionUtility.equalsCollection(m_jsonTable.getColumnsInViewOrder(), condition.getColumns())) { return null;
public boolean isRelevant(IClientNotificationAddress address) { return address.isNotifyAllSessions() || address.isNotifyAllNodes() || CollectionUtility.containsAny(getAllSessionIds(), address.getSessionIds()) || CollectionUtility.containsAny(getAllUserIds(), address.getUserIds()); }