ix.util.lisp
Class Cons
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.AbstractSequentialList
ix.util.lisp.LList
ix.util.lisp.Cons
- All Implemented Interfaces:
- LispObject, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable, java.lang.Iterable, java.util.Collection, java.util.List
public class Cons
- extends LList
- implements java.lang.Cloneable
Non-empty lists.
- See Also:
- Serialized Form
Field Summary |
(package private) java.lang.Object |
car
|
(package private) LList |
cdr
|
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary |
Cons(java.util.Collection c)
|
Cons(java.lang.Object car,
LList cdr)
|
Methods inherited from class ix.util.lisp.LList |
alistEntry, alistKeys, alistToMap, alistValue, delete, drop, dropTo, flatmap, get, get, insert, intersect, isEmpty, iterator, lastCons, lastIndexOf, listIterator, LListify, mapc, mapcar, mapNth, mapToAlist, mapTree, newLList, permute, put, replaceAll, reverse, size, take, takeTo, toJavaString, walkTree, without, withoutAll, withoutFirst, withoutFirstEqual |
Methods inherited from class java.util.AbstractSequentialList |
add, addAll, remove, set |
Methods inherited from class java.util.AbstractList |
add, clear, equals, hashCode, indexOf, listIterator, removeRange, subList |
Methods inherited from class java.util.AbstractCollection |
contains, containsAll, remove, removeAll, retainAll, toArray, toArray |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
contains, containsAll, remove, removeAll, retainAll, toArray, toArray |
car
java.lang.Object car
cdr
LList cdr
Cons
public Cons(java.lang.Object car,
LList cdr)
Cons
public Cons(java.util.Collection c)
newInstance
protected Cons newInstance(java.lang.Object car,
LList cdr)
- Creates a new instance of this class. This method must be
redefined any any Cons subclass.
typedCons
public static Cons typedCons(java.lang.Class consClass,
java.lang.Object car,
LList cdr)
addAll
public boolean addAll(java.util.Collection c)
- Specified by:
addAll
in interface java.util.Collection
- Specified by:
addAll
in interface java.util.List
- Overrides:
addAll
in class java.util.AbstractCollection
isNull
public boolean isNull()
- Specified by:
isNull
in class LList
car
public java.lang.Object car()
- Specified by:
car
in class LList
cdr
public LList cdr()
- Specified by:
cdr
in class LList
setCar
public void setCar(java.lang.Object c)
setCdr
public void setCdr(java.lang.Object c)
length
public int length()
- Specified by:
length
in class LList
elementAt
public java.lang.Object elementAt(int i)
- Specified by:
elementAt
in class LList
elements
public java.util.Enumeration elements()
- Specified by:
elements
in class LList
equal
public boolean equal(LList list)
- Specified by:
equal
in class LList
find
public boolean find(java.lang.Object a)
- Specified by:
find
in class LList
append
public LList append(LList tail)
- Specified by:
append
in class LList
clone
public java.lang.Object clone()
- Overrides:
clone
in class LList
compareTo
public int compareTo(java.lang.Object o)
- Specified by:
compareTo
in interface java.lang.Comparable
toString
public java.lang.String toString()
- Overrides:
toString
in class java.util.AbstractCollection