edu.iu.cnets.klatsch.lang
Class VQueue

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

public class VQueue
extends Value

This value represents a queue (i.e. FIFO).


Field Summary
(package private)  java.util.Queue<Value> q
          the values actually being stored
 
Constructor Summary
VQueue(java.util.Queue<Value> q)
           
 
Method Summary
 Value method_deq(Value... args)
          deq() : Dequeue the head element from the queue.
 Value method_empty(Value... args)
          empty() : Returns true if the queue is empty.
 Value method_enq(Value... args)
          enq(v) : Enqueues the value v to the end of the queue.
 Value method_len(Value... args)
          len() : Returns the length of the queue.
 Value method_list(Value... args)
          list() : Converts the queue to a list.
 Value method_peek(Value... args)
          peek() : Returns the head elements without dequeuing it.
 Value method_stream(Value... args)
          stream() : Converts the queue to a 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

q

java.util.Queue<Value> q
the values actually being stored

Constructor Detail

VQueue

public VQueue(java.util.Queue<Value> q)
Method Detail

toString

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

method_deq

public Value method_deq(Value... args)
                 throws EvaluationException
deq() : Dequeue the head element from the queue.

Throws:
EvaluationException

method_empty

public Value method_empty(Value... args)
                   throws EvaluationException
empty() : Returns true if the queue is empty.

Throws:
EvaluationException

method_enq

public Value method_enq(Value... args)
                 throws EvaluationException
enq(v) : Enqueues the value v to the end of the queue. Returns the queue to support method chaining.

Throws:
EvaluationException

method_len

public Value method_len(Value... args)
                 throws EvaluationException
len() : Returns the length of the queue.

Throws:
EvaluationException

method_list

public Value method_list(Value... args)
                  throws EvaluationException
list() : Converts the queue to a list.

Throws:
EvaluationException

method_peek

public Value method_peek(Value... args)
                  throws EvaluationException
peek() : Returns the head elements without dequeuing it.

Throws:
EvaluationException

method_stream

public Value method_stream(Value... args)
                    throws EvaluationException
stream() : Converts the queue to a stream.

Throws:
EvaluationException