public class IteratorCollection extends AbstractCollection
Collection that lazily reads its elements from an
Iterator.
In other words, you can call iterator() as often as you want, but the
IteratorCollection will iterate over its delegate only once.
| Constructor and Description |
|---|
IteratorCollection(Iterator iterator) |
| Modifier and Type | Method and Description |
|---|---|
Iterator |
iterator() |
int |
size() |
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitequals, hashCodepublic IteratorCollection(Iterator iterator)
public Iterator iterator()
iterator in interface Iterableiterator in interface Collectioniterator in class AbstractCollectionpublic int size()
size in interface Collectionsize in class AbstractCollectionCopyright © 2001-2012. All Rights Reserved.