Class LinkList
Class LinkList
Object
|
+----LinkList
- public class LinkList
- extends Object
A simple one-directional external linked list class.
-
LinkList(Object)
-
-
cons(Object)
- Create a new list node; insert it at the head of the list.
-
rest()
- The remainder of the list
-
swapValues(LinkList, LinkList)
- Swap the values of a and b.
-
value()
- The object owned by the list node
LinkList
public LinkList(Object obj)
cons
public LinkList cons(Object obj)
- Create a new list node; insert it at the head of the list. Return the list.
rest
public LinkList rest()
- The remainder of the list
swapValues
public static void swapValues(LinkList a,
LinkList b)
- Swap the values of a and b.
value
public java.lang.Object value()
- The object owned by the list node