orc.runtime.values
Class ListValue
java.lang.Object
   orc.runtime.values.Value
orc.runtime.values.Value
       orc.runtime.values.ListValue
orc.runtime.values.ListValue
- All Implemented Interfaces: 
- java.lang.Iterable, ListLike
- Direct Known Subclasses: 
- ConsValue, NilValue
- public abstract class ListValue 
- extends Value- implements java.lang.Iterable, ListLike
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.)
 
 
 
| Method Summary | 
| 
 | accept(Visitor<E> visitor)
 | 
| abstract  java.util.List<java.lang.Object> | enlist()
 | 
|  java.util.Iterator | iterator()
 | 
| static ListValue | make(java.util.List<java.lang.Object> vs)
 | 
| static ListValue | make(java.lang.Object[] vs)
 | 
| abstract  void | uncons(Token caller)Return the head and tail of a cons-like data structure to a token, or
 die.
 | 
| abstract  void | unnil(Token caller)Signal a token if this value is equivalent to nil, or die.
 | 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
ListValue
public ListValue()
enlist
public abstract java.util.List<java.lang.Object> enlist()
- 
 
- 
 
make
public static ListValue make(java.lang.Object[] vs)
- 
 
- 
 
make
public static ListValue make(java.util.List<java.lang.Object> vs)
- 
 
- 
 
iterator
public java.util.Iterator iterator()
- 
- Specified by:
- iteratorin interface- java.lang.Iterable
 
- 
 
accept
public <E> E accept(Visitor<E> visitor)
- 
- Overrides:
- acceptin class- Value
 
- 
 
uncons
public abstract void uncons(Token caller)
- Description copied from interface: ListLike
- Return the head and tail of a cons-like data structure to a token, or
 die. The only place this should be called is TryCons
 
- 
- Specified by:
- unconsin interface- ListLike
 
- 
 
unnil
public abstract void unnil(Token caller)
- Description copied from interface: ListLike
- Signal a token if this value is equivalent to nil, or die. The only place
 this should be called is TryNil
 
- 
- Specified by:
- unnilin interface- ListLike
 
-