edu.iu.cnets.klatsch.stream
Class SIterator

java.lang.Object
  extended by edu.iu.cnets.klatsch.stream.Stream
      extended by edu.iu.cnets.klatsch.stream.SIterator
Direct Known Subclasses:
SEventIterator, SWrapperIterator

public class SIterator
extends Stream

This class wraps a stream around an iterator of Value objects.


Field Summary
(package private)  java.util.Iterator<?> iter
          the iterator we're using
 
Fields inherited from class edu.iu.cnets.klatsch.stream.Stream
buffer
 
Constructor Summary
SIterator(java.util.Iterator<?> iter)
          Builds a new stream from the given iterator.
 
Method Summary
 boolean done()
          Sees whether we're at the end of the stream.
 Value getNext()
          Gets the next value in the list, if possible.
 java.lang.String toString()
          Provides an indication of internal state.
 
Methods inherited from class edu.iu.cnets.klatsch.stream.Stream
current, get
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

iter

java.util.Iterator<?> iter
the iterator we're using

Constructor Detail

SIterator

public SIterator(java.util.Iterator<?> iter)
Builds a new stream from the given iterator.

Method Detail

getNext

public Value getNext()
              throws EvaluationException
Gets the next value in the list, if possible.

Specified by:
getNext in class Stream
Returns:
the value
Throws:
EvaluationException

done

public boolean done()
Sees whether we're at the end of the stream.

Specified by:
done in class Stream
Returns:
true for end-of-stream

toString

public java.lang.String toString()
Provides an indication of internal state.

Overrides:
toString in class java.lang.Object
Returns:
the stream in string form