Class AbstractLinkedList.LinkedSubList<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
org.apache.commons.collections4.list.AbstractLinkedList.LinkedSubList<E>
- Type Parameters:
E
- the type of elements in this list.
- All Implemented Interfaces:
Iterable<E>
,Collection<E>
,List<E>
- Enclosing class:
AbstractLinkedList<E>
The sublist implementation for AbstractLinkedList.
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
ModifierConstructorDescriptionprotected
LinkedSubList
(AbstractLinkedList<E> parent, int fromIndex, int toIndex) Constructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
addAll
(int index, Collection<? extends E> coll) boolean
addAll
(Collection<? extends E> coll) protected void
Throws aConcurrentModificationException
if this instance fails its concurrency check.void
clear()
get
(int index) iterator()
listIterator
(int index) protected void
rangeCheck
(int index, int beyond) Throws anIndexOutOfBoundsException
if the given indices are out of bounds.remove
(int index) int
size()
subList
(int fromIndexInclusive, int toIndexExclusive) Methods inherited from class java.util.AbstractList
add, equals, hashCode, indexOf, lastIndexOf, listIterator, removeRange
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream
Methods inherited from interface java.util.List
contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Constructor Details
-
LinkedSubList
Constructs a new instance.- Parameters:
parent
- The parent AbstractLinkedList.fromIndex
- An index greater or equal to 0 and less thantoIndex
.toIndex
- An index greater thanfromIndex
.
-
-
Method Details
-
add
-
addAll
- Specified by:
addAll
in interfaceCollection<E>
- Specified by:
addAll
in interfaceList<E>
- Overrides:
addAll
in classAbstractCollection<E>
-
addAll
-
checkModCount
Throws aConcurrentModificationException
if this instance fails its concurrency check. -
clear
- Specified by:
clear
in interfaceCollection<E>
- Specified by:
clear
in interfaceList<E>
- Overrides:
clear
in classAbstractList<E>
-
get
-
iterator
-
listIterator
- Specified by:
listIterator
in interfaceList<E>
- Overrides:
listIterator
in classAbstractList<E>
-
rangeCheck
Throws anIndexOutOfBoundsException
if the given indices are out of bounds.- Parameters:
index
- lower index.beyond
- upper index.
-
remove
-
set
-
size
- Specified by:
size
in interfaceCollection<E>
- Specified by:
size
in interfaceList<E>
- Specified by:
size
in classAbstractCollection<E>
-
subList
-