List of utility methods to do Iterable First
boolean | equal(Iterable Compare elements, sort order and length return equal(first.iterator(), second.iterator());
|
E | first(final Iterable first if (null == iterable) { return null; final Iterator<E> it = iterable.iterator(); if (!it.hasNext()) { return null; return it.next(); ... |
T | first(final Iterable first return iter == null ? null : next(iter.iterator());
|
T | first(Iterable extends T> iterable) first return first(iterable.iterator());
|
E | first(Iterable first Iterator<E> iterator = i.iterator(); if (!iterator.hasNext()) { throw new IllegalArgumentException("iterator has no elements"); return iterator.next(); |
T | first(Iterable first return first(iterable.iterator(), null);
|
T | first(Iterable Returns the first element of the collection. if (iterable instanceof Deque<?>) return ((Deque<T>) iterable).getFirst(); if (iterable instanceof List<?>) { List<T> list = (List<T>) iterable; return list.isEmpty() ? null : list.get(0); Iterator<T> iterator = iterable.iterator(); return iterator.hasNext() ? iterator.next() : null; ... |
E | firstElement(Iterable Returns the first element of the given Iterable final int indexPosition = 0; return elementAt(iterable, indexPosition); |
Object | firstElementOrNull(Iterable iterable) first Element Or Null Iterator iterator = iterable.iterator(); if (iterator.hasNext()) { return iterator.next(); } else { return null; |
T | firstOf(final Iterable first Of return nthOf(iterable, 0);
|