edu.iu.cnets.klatsch.stream
Class SList

java.lang.Object
  extended by edu.iu.cnets.klatsch.stream.Stream
      extended by edu.iu.cnets.klatsch.stream.SList

public class SList
extends Stream

This class wraps a stream around a VList.


Field Summary
(package private)  int index
          our current index in the list (the next one to be returned)
(package private)  VList ls
          the list we're iterating over
 
Fields inherited from class edu.iu.cnets.klatsch.stream.Stream
buffer
 
Constructor Summary
SList(VList ls)
          Builds a new stream from the given list.
 
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

ls

VList ls
the list we're iterating over


index

int index
our current index in the list (the next one to be returned)

Constructor Detail

SList

public SList(VList ls)
Builds a new stream from the given list.

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