Class AbstractLinkedList

java.lang.Object
org.apache.commons.collections.list.AbstractLinkedList
All Implemented Interfaces:
Iterable, Collection, List, SequencedCollection
Direct Known Subclasses:
CursorableLinkedList, NodeCachingLinkedList

public abstract class AbstractLinkedList extends Object implements List
An abstract implementation of a linked list which provides numerous points for subclasses to override.

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.

Since:
Commons Collections 3.0
Version:
$Revision: 646777 $ $Date: 2008-04-10 14:33:15 +0200 (Thu, 10 Apr 2008) $
Author:
Rich Dougherty, Phil Steitz, Stephen Colebourne
  • Field Details

    • size

      protected transient int size
      The size of the list
    • modCount

      protected transient int modCount
      Modification count for iterators
  • Constructor Details

    • AbstractLinkedList

      protected AbstractLinkedList()
      Constructor that does nothing intended for deserialization.

      If this constructor is used by a serializable subclass then the init() method must be called.

    • AbstractLinkedList

      protected AbstractLinkedList(Collection coll)
      Constructs a list copying data from the specified collection.
      Parameters:
      coll - the collection to copy
  • Method Details