List of utility methods to do Collection Add
Collection | addIfNotNull(Collection Adds a value to the collection if it's not null. return addIf(coll, value, value != null);
|
void | addIfNotNull(Collection Utility method to add an Object to a List if another passed Object is not null if (objectToCheckIfNull != null) {
listToAddTo.add(itemToAddToList);
|
boolean | addIfNotNull(final Collection add If Not Null if (value == null) { return false; } else { return collection.add(value); |
boolean | addIgnoreNull(Collection collection, Object object) Adds an element to the collection unless the element is null. return (object == null ? false : collection.add(object));
|
boolean | addIgnoreNull(Collection super T> collection, T object) From Apache commons-collection. return (object == null ? false : collection.add(object));
|
boolean | addIgnoreNull(final Collection Adds an element to the collection unless the element is null. if (collection == null) { throw new NullPointerException("The collection must not be null"); return object != null && collection.add(object); |
StringBuilder | addInClauseToQuery(StringBuilder query, Collection add In Clause To Query query.append(" ("); for (Iterator<Object> i = l.iterator(); i.hasNext();) { Object columnValue = i.next(); if (columnValue instanceof String) { columnValue = "'" + columnValue + "'"; query.append(columnValue).append(i.hasNext() ? "," : ""); query.append(")"); return query; |
void | addItem(Collection> collection, Object item) add Item ((Collection) collection).add(item); |
void | addMatchingStrings(Collection add Matching Strings for (String string : strings) if (string.startsWith(startWith)) availableProperties.add(string); |
Collection | addNewLines(Collection add New Lines if (strings.size() < 5) return strings; List<String> result = new ArrayList<>(); int counter = 0; for (String string : strings) { if (counter > 0 && counter % 4 == 0) { result.add("\n" + string); } else { ... |