org.codehaus.janino.util.iterator

Class IteratorCollection

public class IteratorCollection extends AbstractCollection

A java.util.Collection that lazily reads its elements from an java.util.Iterator.

In other words, you can call iterator as often as you want, but the IteratorCollection will iterate over its delegate only once.

Constructor Summary
IteratorCollection(Iterator iterator)
Method Summary
Iteratoriterator()
intsize()

Constructor Detail

IteratorCollection

public IteratorCollection(Iterator iterator)

Method Detail

iterator

public Iterator iterator()

size

public int size()