Overridable methods are provided to change the storage node and to change how nodes are added to and removed. Hopefully, all you need for unusual subclasses is here.
| Modifier and Type | Class and Description |
|---|---|
| protected static class | |
| protected static class | |
| protected static class | |
| protected static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv transient AbstractLinkedList. | |
| pack-priv transient int | modCount
Modification count for iterators |
| pack-priv transient int | size
The size of the list |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | AbstractLinkedList(final Collection<? extends E>
the collection to copy coll)Constructs a list copying data from the specified collection. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | add(final E
element to be appended to this list value)Implements java. |
| public void | add(final int
index at which the specified element is to be inserted index, final E element to be inserted value)Implements java. |
| public boolean | addAll(final Collection<? extends E>
collection containing elements to be added to this list coll)Implements java. |
| public boolean | addAll(final int
index at which to insert the first element from the
specified collection index, final Collection<? extends E> collection containing elements to be added to this list coll)Implements java. |
| public boolean | addFirst(final E
the element to be added o)Overrides default java. |
| public boolean | addLast(final E
the element to be added. o)Overrides default java. |
| protected void | addNode(final AbstractLinkedList.
new node to insert nodeToInsert,node to insert before insertBeforeNodeInserts a new node into the list. |
| protected void | addNodeAfter(final AbstractLinkedList.
node to insert after node,value of the newly added node value)Creates a new node with the specified object as its
|
| protected void | addNodeBefore(final AbstractLinkedList.
node to insert before node,value of the newly added node value)Creates a new node with the specified object as its
|
| public void | clear()
Implements java. |
| public boolean | contains(final Object
element whose presence in this list is to be tested value)Implements java. true if this list contains the specified element.
|
| public boolean | containsAll(final Collection<?>
collection to be checked for containment in this list coll)Implements java. true if this list contains all of the elements of the
specified collection.
|
| protected AbstractLinkedList. | Returns: newly created nodeCreates a new node with previous, next and element all set to null. |
| protected AbstractLinkedList. | Returns: a new node containing the valuevalue of the new node value)Creates a new node with the specified properties. |
| protected Iterator | Returns: a new iterator on the given sublistthe sublist to get an iterator for subListCreates an iterator for the sublist. |
| protected ListIterator | Returns: a new list iterator on the given sublistthe sublist to get an iterator for subList,the index to start from, relative to the sublist fromIndex)Creates a list iterator for the sublist. |
| protected void | doReadObject(final ObjectInputStream
the stream to read the object from inputStream)Deserializes the data held in this object to the stream specified. |
| protected void | doWriteObject(final ObjectOutputStream
the stream to write the object to outputStream)Serializes the data held in this object to the stream specified. |
| public boolean | equals(final Object
the object to be compared for equality with this list obj)Overrides java. Implements java. |
| public E | get(final int
index of the element to return index)Implements java. |
| public E | |
| public E | |
| protected AbstractLinkedList. | Returns: the node at the given indexthe index, starting from 0 index, final boolean whether or not the end marker can be returned if
startIndex is set to the list's size endMarkerAllowed)Gets the node at a particular index. |
| public int | hashCode()
Overrides java. Implements java. |
| public int | indexOf(final Object
element to search for value)Implements java. |
| protected void | init()
The equivalent of a default constructor, broken out so it can be called
by any constructor and by |
| public boolean | |
| protected boolean | Returns: true if equalthe first value to compare, may be null value1, final Object the second value to compare, may be null value2)Compares two values for equals. |
| public Iterator | iterator()
Implements java. |
| public int | lastIndexOf(final Object
element to search for value)Implements java. |
| public ListIterator | listIterator()
Implements java. |
| public ListIterator | listIterator(final int
index of the first element to be returned from the
list iterator (by a call to fromIndex)next)Implements java. |
| public E | remove(final int
the index of the element to be removed index)Implements java. |
| public boolean | remove(final Object
element to be removed from this list, if present value)Implements java. |
| public boolean | removeAll(final Collection<?>
collection containing elements to be removed from this list coll)Implements java. |
| protected void | |
| public E | removeFirst()
Overrides default java. |
| public E | removeLast()
Overrides default java. |
| protected void | removeNode(final AbstractLinkedList.
the node to remove nodeRemoves the specified node from the list. |
| public boolean | retainAll(final Collection<?>
collection containing elements to be retained in this list coll)Implements java. |
| public E | set(final int
index of the element to replace index, final E element to be stored at the specified position value)Implements java. |
| public int | |
| public List | Returns: the new sublistthe index to start from fromIndexInclusive, final int the index to end at toIndexExclusive)Implements java. |
| public Object[] | toArray()
Implements java. |
| public <T> T[] | toArray(T[]
the array into which the elements of this list are to
be stored, if it is big enough; otherwise, a new array of the
same runtime type is allocated for this purpose. array)Implements java. |
| public String | |
| protected void | updateNode(final AbstractLinkedList.
node to update node,new value of the node value)Updates the node with a new value. |