@ParametersAreNonnullByDefault public class SingleUseIterable<T> extends Object implements Iterable<T>
Iterable wrapper for an iterator. If the iterator is retrieved more than once, an exception
will be thrown.| Modifier and Type | Method and Description |
|---|---|
static <T> SingleUseIterable<T> |
create(Iterator<T> iterator)
Convenience static factory because constructors can't infer generic types.
|
Iterator<T> |
iterator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliterator@Nonnull public static <T> SingleUseIterable<T> create(Iterator<T> iterator)
iterator - the iterator to wrapCopyright © 2003–2018 Atlassian. All rights reserved.