public abstract class AbstractChain<E extends Serializable> extends AbstractList<E> implements Serializable
Modifier and Type | Field and Description |
---|---|
protected int |
length |
protected AbstractChain<E> |
previous |
protected E |
tailValue |
modCount
Modifier | Constructor and Description |
---|---|
protected |
AbstractChain(AbstractChain<E> prev,
E tv)
Construct a new chain node.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
E |
get(int i) |
E |
getTailValue() |
int |
hashCode() |
Iterator<E> |
iterator() |
Iterable<E> |
reverse() |
Iterator<E> |
reverseIterator()
Iterate over this chain's elements in reverse order.
|
int |
size() |
add, add, addAll, clear, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
parallelStream, removeIf, stream
protected final AbstractChain<E extends Serializable> previous
protected final E extends Serializable tailValue
protected final int length
protected AbstractChain(AbstractChain<E> prev, E tv)
prev
- The previous node, or null
for a singleton chain.tv
- The value to go at the end of the chain.public E getTailValue()
public int size()
size
in interface Collection<E extends Serializable>
size
in interface List<E extends Serializable>
size
in class AbstractCollection<E extends Serializable>
public E get(int i)
get
in interface List<E extends Serializable>
get
in class AbstractList<E extends Serializable>
@Nonnull public Iterator<E> iterator()
iterator
in interface Iterable<E extends Serializable>
iterator
in interface Collection<E extends Serializable>
iterator
in interface List<E extends Serializable>
iterator
in class AbstractList<E extends Serializable>
public Iterator<E> reverseIterator()
public int hashCode()
hashCode
in interface Collection<E extends Serializable>
hashCode
in interface List<E extends Serializable>
hashCode
in class AbstractList<E extends Serializable>
public boolean equals(Object o)
equals
in interface Collection<E extends Serializable>
equals
in interface List<E extends Serializable>
equals
in class AbstractList<E extends Serializable>
Copyright © 2016 GroupLens Research. All rights reserved.