edu.iu.cnets.klatsch.lang
Class VStream

java.lang.Object
  extended by edu.iu.cnets.klatsch.lang.Value
      extended by edu.iu.cnets.klatsch.lang.VStream

public class VStream
extends Value

This is the language-level encapsulation of a stream.


Field Summary
 Stream s
           
 
Constructor Summary
VStream(Stream s)
           
 
Method Summary
 Value method_current(Value... args)
          current() : Returns the current value in the stream.
 VBoolean method_done(Value... args)
          done() : Tests whether we're at the end of the stream.
 Value method_filter(Value... args)
          filter(p) : Applies a procedure filter to the stream, yielding a new stream.
 Value method_get(Value... args)
          get() : Returns the next item in the stream.
 Value method_limit(Value... args)
          limit(n) : Wrap the stream in a limited-element stream.
 Value method_list(Value... args)
          list() : Converts the stream into a list.
 Value method_map(Value... args)
          map(p) : Applies a procedural mapping to the stream, yielding a new stream.
 VBoolean method_more(Value... args)
          more() : Tests if there are more values to read.
 Value method_reduce(Value... args)
          reduce(p, acc) : Applies a reduction to the stream, yielding a new stream.
 java.lang.String toString()
           
 
Methods inherited from class edu.iu.cnets.klatsch.lang.Value
require, requireCount, requireType, toJson
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

s

public Stream s
Constructor Detail

VStream

public VStream(Stream s)
Method Detail

toString

public java.lang.String toString()
Specified by:
toString in class Value

method_current

public Value method_current(Value... args)
                     throws EvaluationException
current() : Returns the current value in the stream.

Throws:
EvaluationException

method_done

public VBoolean method_done(Value... args)
                     throws EvaluationException
done() : Tests whether we're at the end of the stream.

Throws:
EvaluationException

method_filter

public Value method_filter(Value... args)
                    throws EvaluationException
filter(p) : Applies a procedure filter to the stream, yielding a new stream.

Throws:
EvaluationException

method_get

public Value method_get(Value... args)
                 throws EvaluationException
get() : Returns the next item in the stream.

Throws:
EvaluationException

method_limit

public Value method_limit(Value... args)
                   throws EvaluationException
limit(n) : Wrap the stream in a limited-element stream.

Throws:
EvaluationException

method_list

public Value method_list(Value... args)
                  throws EvaluationException
list() : Converts the stream into a list. Better hope it's not an infinite stream!

Throws:
EvaluationException

method_map

public Value method_map(Value... args)
                 throws EvaluationException
map(p) : Applies a procedural mapping to the stream, yielding a new stream.

Throws:
EvaluationException

method_more

public VBoolean method_more(Value... args)
                     throws EvaluationException
more() : Tests if there are more values to read.

Throws:
EvaluationException

method_reduce

public Value method_reduce(Value... args)
                    throws EvaluationException
reduce(p, acc) : Applies a reduction to the stream, yielding a new stream.

Throws:
EvaluationException