orc.runtime.values
Class ConsValue

java.lang.Object
  extended by orc.runtime.values.Value
      extended by orc.runtime.values.ListValue
          extended by orc.runtime.values.ConsValue
All Implemented Interfaces:
java.lang.Iterable, Future

public class ConsValue
extends ListValue


Constructor Summary
ConsValue(Value h, ListValue t)
           
 
Method Summary
 java.util.List<Value> enlist()
           
 Value head()
          Return the head value of a cons-like data structure.
 boolean isCons()
           
 ListValue tail()
          Return the tail value of a cons-like data structure.
 java.lang.String toString()
           
 
Methods inherited from class orc.runtime.values.ListValue
accept, iterator, make
 
Methods inherited from class orc.runtime.values.Value
forceArg, forceCall, isNil, isNone, isSome, signal, untag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConsValue

public ConsValue(Value h,
                 ListValue t)
Method Detail

isCons

public boolean isCons()
Overrides:
isCons in class Value

head

public Value head()
Description copied from class: Value
Return the head value of a cons-like data structure. This method must throw an exception iff isCons() returns false.

Overrides:
head in class Value

tail

public ListValue tail()
Description copied from class: Value
Return the tail value of a cons-like data structure. This method must throw an exception iff isCons() returns false.

Overrides:
tail in class Value

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

enlist

public java.util.List<Value> enlist()
Specified by:
enlist in class ListValue