All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----oplan.util.lisp.LispObject | +----oplan.util.lisp.List
The class structure is like that in Common Lisp -- there is an abstract class List with two subclasses, Cons and Null -- but only proper lists are allowed. The car of a Cons can be any Object, but the cdr must be a List.
The empty list is the value of Lisp.NIL and is the only instance of the class Null.
An important goal was that all lists, including the empty list, could be enumerated. That's one reason for having a List subclass for the empty list, rather than just using a unique Object or null. The subclass also allows a number of other methods to be defined for all lists.
public List()
public abstract boolean isNull()
public abstract Object car()
public abstract List cdr()
public abstract int length()
public abstract Object elementAt(int i)
public abstract Enumeration elements()
public abstract boolean equal(List list)
public abstract boolean find(Object a)
public abstract List append(List tail)
public Object clone()
public List reverse()
public Object get(Object propname)
public Cons lastCons()
public List take(int n)
public List drop(int n)
public List replaceAll(Object old, Object neu)
public List mapc(Function1 f)
public List mapcar(Function1 f)
public List flatmap(Function1 f)
public void walkTree(Function1 f)
public List intersect(List set)
All Packages Class Hierarchy This Package Previous Next Index