List of utility methods to do Iterator to Iterable
Iterable | iterable(final Iterator it) iterable return new Iterable<A>() { boolean used = false; @Override public Iterator<A> iterator() { if (used) throw new IllegalStateException("iterator may not be called more than once"); used = true; return it; ... |
Iterable | iterable(final Iterator iterable if (iterator == null) { throw new NullPointerException(); return new Iterable<E>() { public Iterator<E> iterator() { return iterator; }; ... |
Iterable | iterable(final Iterator iterator) Makes an Interator iterable with foreach return new Iterable<I>() { @Override public Iterator<I> iterator() { return iterator; }; |
Iterable | iterable(final Iterator Creates an Iterable instance that just returns the given Iterator from its iterator() method. if (iter == null) throw new NullPointerException("iter parameter is null"); return new Iterable<T>() { public Iterator<T> iterator() { return iter; }; |
Iterable | iterable(Iterator iterable return () -> iterator;
|
Iterable | toIterable(final Iterator Returns an Iterable returning the passed in Iterator . return new Iterable<T>() { @Override public Iterator<T> iterator() { return iterator; }; |
Iterable | toIterable(final Iterator to Iterable return new Iterable<T>() { @Override public Iterator<T> iterator() { return iterator; }; |
Iterable | toIterable(final Iterator Create an Iterable from an Iterator . return () -> iterator;
|