edu.iu.cnets.klatsch.stream
Class Stream
java.lang.Object
edu.iu.cnets.klatsch.stream.Stream
- Direct Known Subclasses:
- SIterator, SLimit, SList, SProcedure, SRange
public abstract class Stream
- extends java.lang.Object
A stream differs from a list in that it's not random-access and doesn't necessarily have finite length.
They can be produced in a variety of ways, each of which may have their own internal representation for
their state.
Field Summary |
(package private) Value |
buffer
used to buffer a single item |
Method Summary |
Value |
current()
Returns the next value that would be returned by get(). |
abstract boolean |
done()
|
Value |
get()
Reads the next value from the stream. |
abstract Value |
getNext()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
buffer
Value buffer
- used to buffer a single item
Stream
public Stream()
getNext
public abstract Value getNext()
throws EvaluationException
- Throws:
EvaluationException
done
public abstract boolean done()
current
public Value current()
throws EvaluationException
- Returns the next value that would be returned by get().
- Returns:
- the value
- Throws:
EvaluationException
get
public Value get()
throws EvaluationException
- Reads the next value from the stream.
- Returns:
- the value
- Throws:
EvaluationException