Class NodeCachingLinkedList

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

@Deprecated(since="2021-04-30") public class NodeCachingLinkedList extends AbstractLinkedList implements Serializable
Deprecated.
Apache Commons Collections version 3.x is being deprecated from AEMaaCS. The upgraded version 4.4 of Commons Collections is already included as replacement. Customers are advised to upgrade to this version of the library. Please note: the package name was changed to org.apache.commons.collections4. Further note that there are AEM APIs currently exposing the old collections classes; these will be updated in upcoming releases.
A List implementation that stores a cache of internal Node objects in an effort to reduce wasteful object creation.

A linked list creates one Node for each item of data added. This can result in a lot of object creation and garbage collection. This implementation seeks to avoid that by maintaining a store of cached nodes.

This implementation is suitable for long-lived lists where both add and remove are used. Short-lived lists, or lists which only grow will have worse performance using this class.

Note that this implementation is not synchronized.

Since:
Commons Collections 3.0
See Also:
  • Constructor Details

    • NodeCachingLinkedList

      public NodeCachingLinkedList()
      Deprecated.
      Constructor that creates.
    • NodeCachingLinkedList

      public NodeCachingLinkedList(Collection coll)
      Deprecated.
      Constructor that copies the specified collection
      Parameters:
      coll - the collection to copy
    • NodeCachingLinkedList

      public NodeCachingLinkedList(int maximumCacheSize)
      Deprecated.
      Constructor that species the maximum cache size.
      Parameters:
      maximumCacheSize - the maximum cache size