Java Utililty Methods Iterable First

List of utility methods to do Iterable First

Description

The list of methods to do Iterable First are organized into topic(s).

Method

TgetFirstOrNull(Iterable it)
get First Or Null
if (it == null)
    return null;
Iterator<T> i = it.iterator();
if (i == null || !i.hasNext())
    return null;
try {
    return i.next();
} catch (NoSuchElementException e) {
...
TgetFirstOrNull(Iterable iterable)
Get the first element from iterable.
return getFirstOrNull(iterable.iterator());
TremoveFirst(Iterable iterable)
remove First
return removeNext(iterable.iterator());