Class AbstractLinkedList
- java.lang.Object
-
- org.apache.commons.collections.list.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.
-
-
-
Method Detail
-
size
public int size()
Deprecated.- Specified by:
size
in interfacejava.util.Collection
- Specified by:
size
in interfacejava.util.List
-
isEmpty
public boolean isEmpty()
Deprecated.- Specified by:
isEmpty
in interfacejava.util.Collection
- Specified by:
isEmpty
in interfacejava.util.List
-
get
public java.lang.Object get(int index)
Deprecated.- Specified by:
get
in interfacejava.util.List
-
iterator
public java.util.Iterator iterator()
Deprecated.- Specified by:
iterator
in interfacejava.util.Collection
- Specified by:
iterator
in interfacejava.lang.Iterable
- Specified by:
iterator
in interfacejava.util.List
-
listIterator
public java.util.ListIterator listIterator()
Deprecated.- Specified by:
listIterator
in interfacejava.util.List
-
listIterator
public java.util.ListIterator listIterator(int fromIndex)
Deprecated.- Specified by:
listIterator
in interfacejava.util.List
-
indexOf
public int indexOf(java.lang.Object value)
Deprecated.- Specified by:
indexOf
in interfacejava.util.List
-
lastIndexOf
public int lastIndexOf(java.lang.Object value)
Deprecated.- Specified by:
lastIndexOf
in interfacejava.util.List
-
contains
public boolean contains(java.lang.Object value)
Deprecated.- Specified by:
contains
in interfacejava.util.Collection
- Specified by:
contains
in interfacejava.util.List
-
containsAll
public boolean containsAll(java.util.Collection coll)
Deprecated.- Specified by:
containsAll
in interfacejava.util.Collection
- Specified by:
containsAll
in interfacejava.util.List
-
toArray
public java.lang.Object[] toArray()
Deprecated.- Specified by:
toArray
in interfacejava.util.Collection
- Specified by:
toArray
in interfacejava.util.List
-
toArray
public java.lang.Object[] toArray(java.lang.Object[] array)
Deprecated.- Specified by:
toArray
in interfacejava.util.Collection
- Specified by:
toArray
in interfacejava.util.List
-
subList
public java.util.List subList(int fromIndexInclusive, int toIndexExclusive)
Deprecated.Gets a sublist of the main list.- Specified by:
subList
in interfacejava.util.List
- Parameters:
fromIndexInclusive
- the index to start fromtoIndexExclusive
- the index to end at- Returns:
- the new sublist
-
add
public boolean add(java.lang.Object value)
Deprecated.- Specified by:
add
in interfacejava.util.Collection
- Specified by:
add
in interfacejava.util.List
-
add
public void add(int index, java.lang.Object value)
Deprecated.- Specified by:
add
in interfacejava.util.List
-
addAll
public boolean addAll(java.util.Collection coll)
Deprecated.- Specified by:
addAll
in interfacejava.util.Collection
- Specified by:
addAll
in interfacejava.util.List
-
addAll
public boolean addAll(int index, java.util.Collection coll)
Deprecated.- Specified by:
addAll
in interfacejava.util.List
-
remove
public java.lang.Object remove(int index)
Deprecated.- Specified by:
remove
in interfacejava.util.List
-
remove
public boolean remove(java.lang.Object value)
Deprecated.- Specified by:
remove
in interfacejava.util.Collection
- Specified by:
remove
in interfacejava.util.List
-
removeAll
public boolean removeAll(java.util.Collection coll)
Deprecated.- Specified by:
removeAll
in interfacejava.util.Collection
- Specified by:
removeAll
in interfacejava.util.List
-
retainAll
public boolean retainAll(java.util.Collection coll)
Deprecated.- Specified by:
retainAll
in interfacejava.util.Collection
- Specified by:
retainAll
in interfacejava.util.List
-
set
public java.lang.Object set(int index, java.lang.Object value)
Deprecated.- Specified by:
set
in interfacejava.util.List
-
clear
public void clear()
Deprecated.- Specified by:
clear
in interfacejava.util.Collection
- Specified by:
clear
in interfacejava.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 interfacejava.util.Collection
- Specified by:
equals
in interfacejava.util.List
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
Deprecated.- Specified by:
hashCode
in interfacejava.util.Collection
- Specified by:
hashCode
in interfacejava.util.List
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toString
in classjava.lang.Object
-
-