List of utility methods to do Collection First
T | getFirst(Collection Get the first item from the collection. return get(col, 0);
|
T | getFirst(Collection INTERNAL: Gets the first object in the collection. if (coll == null || coll.isEmpty()) return null; if (coll instanceof List) return ((List<T>) coll).get(0); Iterator<T> iter = coll.iterator(); while (iter.hasNext()) { return iter.next(); return null; |
T | getFirst(Collection get First if (isEmpty(collection)) { return null; return collection.iterator().next(); |
T | getFirst(Collection get First if (collection != null) { Iterator<T> iterator = collection.iterator(); return iterator.hasNext() ? iterator.next() : null; return null; |
T | getFirst(Collection get First if (isEmpty(collection)) { return null; return collection.iterator().next(); |
T | getFirst(Collection get First if (isEmpty(collection)) { return null; if (collection instanceof List) { return ((List<T>) collection).get(0); return collection.iterator().next(); |
T | getFirst(Collection get First if (isEmpty(collection)) { return null; return collection.iterator().next(); |
T | getFirst(Collection get First if (isEmpty(collection)) { return null; return collection.iterator().next(); |
T | getFirst(Collection get First return l.size() > 0 ? l.iterator().next() : null;
|
T | getFirst(Collection get First if (isNotEmpty(set)) { for (T item : set) { if (item != null) { return item; return null; ... |