orc.runtime.values
Class ListValue

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

public abstract class ListValue
extends Value
implements java.lang.Iterable

Common ancestor for ConsValue and NilValue. Unlike scheme, the Cons constructor does not allow you to create a degenerate cons where the tail is not a list, so we can guarantee that all Conses actually have a list structure. (If you want a degenerate cons, just use a tuples.)


Constructor Summary
ListValue()
           
 
Method Summary
<E> E
accept(Visitor<E> visitor)
           
abstract  java.util.List<Value> enlist()
           
 java.util.Iterator iterator()
           
static ListValue make(java.util.List<Value> vs)
           
 
Methods inherited from class orc.runtime.values.Value
forceArg, forceCall, head, isCons, isNil, isNone, isSome, signal, tail, untag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListValue

public ListValue()
Method Detail

enlist

public abstract java.util.List<Value> enlist()

make

public static ListValue make(java.util.List<Value> vs)

iterator

public java.util.Iterator iterator()
Specified by:
iterator in interface java.lang.Iterable

accept

public <E> E accept(Visitor<E> visitor)
Specified by:
accept in class Value