|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.iu.cnets.klatsch.stream.Stream
edu.iu.cnets.klatsch.stream.SProcedure
public class SProcedure
This class wraps a stream around a procedure. The elements of the stream are produced by repeatedly calling the procedure with the previous value until an error is produced, at which point the stream ends.
Field Summary | |
---|---|
(package private) boolean |
finished
set to true when we're finished |
(package private) Callable |
proc
the procedure we're invoking |
Fields inherited from class edu.iu.cnets.klatsch.stream.Stream |
---|
buffer |
Constructor Summary | |
---|---|
SProcedure(Callable proc)
Builds a new stream from the given procedure. |
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 |
---|
Callable proc
boolean finished
Constructor Detail |
---|
public SProcedure(Callable proc)
Method Detail |
---|
public Value getNext() throws EvaluationException
getNext
in class Stream
EvaluationException
public boolean done()
done
in class Stream
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |