Class AbstractLinkedListJava21.LinkedSubList<E>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- org.apache.commons.collections4.list.AbstractLinkedListJava21.LinkedSubList<E>
-
- Type Parameters:
E- the type of elements in this list.
- All Implemented Interfaces:
java.lang.Iterable<E>,java.util.Collection<E>,java.util.List<E>
- Enclosing class:
- AbstractLinkedListJava21<E>
protected static class AbstractLinkedListJava21.LinkedSubList<E> extends java.util.AbstractList<E>
The sublist implementation for AbstractLinkedListJava21.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedLinkedSubList(AbstractLinkedListJava21<E> parent, int fromIndex, int toIndex)Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, E obj)booleanaddAll(int index, java.util.Collection<? extends E> coll)booleanaddAll(java.util.Collection<? extends E> coll)protected voidcheckModCount()Throws aConcurrentModificationExceptionif this instance fails its concurrency check.voidclear()Eget(int index)java.util.Iterator<E>iterator()java.util.ListIterator<E>listIterator(int index)protected voidrangeCheck(int index, int beyond)Throws anIndexOutOfBoundsExceptionif the given indices are out of bounds.Eremove(int index)Eset(int index, E obj)intsize()java.util.List<E>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
-
-
-
-
Constructor Detail
-
LinkedSubList
protected LinkedSubList(AbstractLinkedListJava21<E> parent, int fromIndex, int toIndex)
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 Detail
-
checkModCount
protected void checkModCount()
Throws aConcurrentModificationExceptionif this instance fails its concurrency check.
-
clear
public void clear()
-
listIterator
public java.util.ListIterator<E> listIterator(int index)
-
rangeCheck
protected void rangeCheck(int index, int beyond)
Throws anIndexOutOfBoundsExceptionif the given indices are out of bounds.- Parameters:
index- lower index.beyond- upper index.
-
size
public int size()
-
-