Class AbstractLinkedList

  • All Implemented Interfaces:
    java.lang.Iterable, java.util.Collection, java.util.List
    Direct Known Subclasses:
    CursorableLinkedList, NodeCachingLinkedList

    @Deprecated(since="2021-04-30")
    public abstract class AbstractLinkedList
    extends java.lang.Object
    implements java.util.List
    Deprecated.
    Commons Collections 3 is in maintenance mode. Commons Collections 4 should be used instead.
    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
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void add​(int index, java.lang.Object value)
      Deprecated.
       
      boolean add​(java.lang.Object value)
      Deprecated.
       
      boolean addAll​(int index, java.util.Collection coll)
      Deprecated.
       
      boolean addAll​(java.util.Collection coll)
      Deprecated.
       
      boolean addFirst​(java.lang.Object o)
      Deprecated.
       
      boolean addLast​(java.lang.Object o)
      Deprecated.
       
      void clear()
      Deprecated.
       
      boolean contains​(java.lang.Object value)
      Deprecated.
       
      boolean containsAll​(java.util.Collection coll)
      Deprecated.
       
      boolean equals​(java.lang.Object obj)
      Deprecated.
       
      java.lang.Object get​(int index)
      Deprecated.
       
      java.lang.Object getFirst()
      Deprecated.
       
      java.lang.Object getLast()
      Deprecated.
       
      int hashCode()
      Deprecated.
       
      int indexOf​(java.lang.Object value)
      Deprecated.
       
      boolean isEmpty()
      Deprecated.
       
      java.util.Iterator iterator()
      Deprecated.
       
      int lastIndexOf​(java.lang.Object value)
      Deprecated.
       
      java.util.ListIterator listIterator()
      Deprecated.
       
      java.util.ListIterator listIterator​(int fromIndex)
      Deprecated.
       
      java.lang.Object remove​(int index)
      Deprecated.
       
      boolean remove​(java.lang.Object value)
      Deprecated.
       
      boolean removeAll​(java.util.Collection coll)
      Deprecated.
       
      java.lang.Object removeFirst()
      Deprecated.
       
      java.lang.Object removeLast()
      Deprecated.
       
      boolean retainAll​(java.util.Collection coll)
      Deprecated.
       
      java.lang.Object set​(int index, java.lang.Object value)
      Deprecated.
       
      int size()
      Deprecated.
       
      java.util.List subList​(int fromIndexInclusive, int toIndexExclusive)
      Deprecated.
      Gets a sublist of the main list.
      java.lang.Object[] toArray()
      Deprecated.
       
      java.lang.Object[] toArray​(java.lang.Object[] array)
      Deprecated.
       
      java.lang.String toString()
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.List

        replaceAll, sort, spliterator
    • Method Detail

      • size

        public int size()
        Deprecated.
        Specified by:
        size in interface java.util.Collection
        Specified by:
        size in interface java.util.List
      • isEmpty

        public boolean isEmpty()
        Deprecated.
        Specified by:
        isEmpty in interface java.util.Collection
        Specified by:
        isEmpty in interface java.util.List
      • get

        public java.lang.Object get​(int index)
        Deprecated.
        Specified by:
        get in interface java.util.List
      • iterator

        public java.util.Iterator iterator()
        Deprecated.
        Specified by:
        iterator in interface java.util.Collection
        Specified by:
        iterator in interface java.lang.Iterable
        Specified by:
        iterator in interface java.util.List
      • listIterator

        public java.util.ListIterator listIterator()
        Deprecated.
        Specified by:
        listIterator in interface java.util.List
      • listIterator

        public java.util.ListIterator listIterator​(int fromIndex)
        Deprecated.
        Specified by:
        listIterator in interface java.util.List
      • indexOf

        public int indexOf​(java.lang.Object value)
        Deprecated.
        Specified by:
        indexOf in interface java.util.List
      • lastIndexOf

        public int lastIndexOf​(java.lang.Object value)
        Deprecated.
        Specified by:
        lastIndexOf in interface java.util.List
      • contains

        public boolean contains​(java.lang.Object value)
        Deprecated.
        Specified by:
        contains in interface java.util.Collection
        Specified by:
        contains in interface java.util.List
      • containsAll

        public boolean containsAll​(java.util.Collection coll)
        Deprecated.
        Specified by:
        containsAll in interface java.util.Collection
        Specified by:
        containsAll in interface java.util.List
      • toArray

        public java.lang.Object[] toArray()
        Deprecated.
        Specified by:
        toArray in interface java.util.Collection
        Specified by:
        toArray in interface java.util.List
      • toArray

        public java.lang.Object[] toArray​(java.lang.Object[] array)
        Deprecated.
        Specified by:
        toArray in interface java.util.Collection
        Specified by:
        toArray in interface java.util.List
      • subList

        public java.util.List subList​(int fromIndexInclusive,
                                      int toIndexExclusive)
        Deprecated.
        Gets a sublist of the main list.
        Specified by:
        subList in interface java.util.List
        Parameters:
        fromIndexInclusive - the index to start from
        toIndexExclusive - the index to end at
        Returns:
        the new sublist
      • add

        public boolean add​(java.lang.Object value)
        Deprecated.
        Specified by:
        add in interface java.util.Collection
        Specified by:
        add in interface java.util.List
      • add

        public void add​(int index,
                        java.lang.Object value)
        Deprecated.
        Specified by:
        add in interface java.util.List
      • addAll

        public boolean addAll​(java.util.Collection coll)
        Deprecated.
        Specified by:
        addAll in interface java.util.Collection
        Specified by:
        addAll in interface java.util.List
      • addAll

        public boolean addAll​(int index,
                              java.util.Collection coll)
        Deprecated.
        Specified by:
        addAll in interface java.util.List
      • remove

        public java.lang.Object remove​(int index)
        Deprecated.
        Specified by:
        remove in interface java.util.List
      • remove

        public boolean remove​(java.lang.Object value)
        Deprecated.
        Specified by:
        remove in interface java.util.Collection
        Specified by:
        remove in interface java.util.List
      • removeAll

        public boolean removeAll​(java.util.Collection coll)
        Deprecated.
        Specified by:
        removeAll in interface java.util.Collection
        Specified by:
        removeAll in interface java.util.List
      • retainAll

        public boolean retainAll​(java.util.Collection coll)
        Deprecated.
        Specified by:
        retainAll in interface java.util.Collection
        Specified by:
        retainAll in interface java.util.List
      • set

        public java.lang.Object set​(int index,
                                    java.lang.Object value)
        Deprecated.
        Specified by:
        set in interface java.util.List
      • clear

        public void clear()
        Deprecated.
        Specified by:
        clear in interface java.util.Collection
        Specified by:
        clear in interface java.util.List
      • getFirst

        public java.lang.Object getFirst()
        Deprecated.
      • getLast

        public java.lang.Object getLast()
        Deprecated.
      • addFirst

        public boolean addFirst​(java.lang.Object o)
        Deprecated.
      • addLast

        public boolean addLast​(java.lang.Object o)
        Deprecated.
      • removeFirst

        public java.lang.Object removeFirst()
        Deprecated.
      • removeLast

        public java.lang.Object removeLast()
        Deprecated.
      • equals

        public boolean equals​(java.lang.Object obj)
        Deprecated.
        Specified by:
        equals in interface java.util.Collection
        Specified by:
        equals in interface java.util.List
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Deprecated.
        Specified by:
        hashCode in interface java.util.Collection
        Specified by:
        hashCode in interface java.util.List
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Deprecated.
        Overrides:
        toString in class java.lang.Object