public class ObjectStreamIterator<T> extends Object implements Iterator<T>
Simple implementation of an Iterator that wraps a object stream’s data. This is suitable for use implementing Iterable.iterator()
.
Constructor and Description |
---|
ObjectStreamIterator(ObjectStream<T> stream)
Construct a new iterator from a stream.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
T |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public ObjectStreamIterator(ObjectStream<T> stream)
Construct a new iterator from a stream.
stream
- The stream to wrap.