public class ImmutableLinkedList<T>
extends java.util.AbstractSequentialList<T>
| Constructor and Description |
|---|
ImmutableLinkedList(T head,
ImmutableLinkedList<T> tail) |
| Modifier and Type | Method and Description |
|---|---|
static <T> boolean |
equal(ImmutableLinkedList<T> a,
ImmutableLinkedList<T> b) |
static int |
hashCode(ImmutableLinkedList<?> list) |
T |
head() |
boolean |
isEmpty() |
T |
last() |
java.util.ListIterator<T> |
listIterator(int index) |
static <T> ImmutableLinkedList<T> |
nil() |
ImmutableLinkedList<T> |
prepend(T object) |
ImmutableLinkedList<T> |
reverse() |
int |
size() |
ImmutableLinkedList<T> |
tail() |
add, addAll, get, iterator, remove, setadd, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, subListaddAll, contains, containsAll, remove, removeAll, retainAll, toArray, toArray, toStringpublic ImmutableLinkedList(T head, ImmutableLinkedList<T> tail)
public static <T> ImmutableLinkedList<T> nil()
public T head()
public ImmutableLinkedList<T> tail()
public T last()
public ImmutableLinkedList<T> prepend(T object)
public ImmutableLinkedList<T> reverse()
public static <T> boolean equal(ImmutableLinkedList<T> a, ImmutableLinkedList<T> b)
public static int hashCode(ImmutableLinkedList<?> list)
public java.util.ListIterator<T> listIterator(int index)
public boolean isEmpty()