All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class oplan.util.lisp.List

java.lang.Object
   |
   +----oplan.util.lisp.LispObject
           |
           +----oplan.util.lisp.List

public abstract class List
extends LispObject
Lisp-style lists.

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.

See Also:
Lisp, Cons, Null

Constructor Index

 o List()

Method Index

 o append(List)
 o car()
 o cdr()
 o clone()
 o drop(int)
 o elementAt(int)
 o elements()
 o equal(List)
 o find(Object)
 o flatmap(Function1)
 o get(Object)
 o intersect(List)
 o isNull()
 o lastCons()
 o length()
 o mapc(Function1)
 o mapcar(Function1)
 o replaceAll(Object, Object)
 o reverse()
 o take(int)
 o walkTree(Function1)

Constructors

 o List
 public List()

Methods

 o isNull
 public abstract boolean isNull()
 o car
 public abstract Object car()
 o cdr
 public abstract List cdr()
 o length
 public abstract int length()
 o elementAt
 public abstract Object elementAt(int i)
 o elements
 public abstract Enumeration elements()
 o equal
 public abstract boolean equal(List list)
 o find
 public abstract boolean find(Object a)
 o append
 public abstract List append(List tail)
 o clone
 public Object clone()
Overrides:
clone in class Object
 o reverse
 public List reverse()
 o get
 public Object get(Object propname)
 o lastCons
 public Cons lastCons()
 o take
 public List take(int n)
 o drop
 public List drop(int n)
 o replaceAll
 public List replaceAll(Object old,
                        Object neu)
 o mapc
 public List mapc(Function1 f)
 o mapcar
 public List mapcar(Function1 f)
 o flatmap
 public List flatmap(Function1 f)
 o walkTree
 public void walkTree(Function1 f)
 o intersect
 public List intersect(List set)

All Packages  Class Hierarchy  This Package  Previous  Next  Index