edu.iu.cnets.klatsch.stream
Class SWrapperIterator
java.lang.Object
edu.iu.cnets.klatsch.stream.Stream
edu.iu.cnets.klatsch.stream.SIterator
edu.iu.cnets.klatsch.stream.SWrapperIterator
public class SWrapperIterator
- extends SIterator
This class wraps a stream around an iterator over non-Klatsch values.
For the class to work successfully, the given value class must be a subclass of Value
and have a single-argument constructor that takes a single value of the same type as the iterator.
Fields inherited from class edu.iu.cnets.klatsch.stream.SIterator |
iter |
Fields inherited from class edu.iu.cnets.klatsch.stream.Stream |
buffer |
Constructor Summary |
SWrapperIterator(java.lang.Class<? extends Value> wrapperClass,
java.util.Iterator<?> iter)
Builds a new stream from the given iterator. |
Method Summary |
Value |
getNext()
Gets the next value in the list, if possible. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
wrapperClass
java.lang.Class<? extends Value> wrapperClass
SWrapperIterator
public SWrapperIterator(java.lang.Class<? extends Value> wrapperClass,
java.util.Iterator<?> iter)
- Builds a new stream from the given iterator. The individual elements will be wrapped in the
given class, which should be a subclass of
Value
.
getNext
public Value getNext()
throws EvaluationException
- Gets the next value in the list, if possible.
- Overrides:
getNext
in class SIterator
- Returns:
- the value
- Throws:
EvaluationException