Class AbstractLinkedList.LinkedSubList<E>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- org.apache.commons.collections4.list.AbstractLinkedList.LinkedSubList<E>
-
- All Implemented Interfaces:
Iterable<E>,Collection<E>,List<E>
- Enclosing class:
- AbstractLinkedList<E>
protected static class AbstractLinkedList.LinkedSubList<E> extends AbstractList<E>
The sublist implementation for AbstractLinkedList.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) intexpectedModCountSublist modCount(package private) intoffsetOffset from the main list(package private) AbstractLinkedList<E>parentThe main list(package private) intsizeSublist size-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedLinkedSubList(AbstractLinkedList<E> parent, int fromIndex, int toIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, E obj)booleanaddAll(int index, Collection<? extends E> coll)booleanaddAll(Collection<? extends E> coll)protected voidcheckModCount()voidclear()Eget(int index)Iterator<E>iterator()ListIterator<E>listIterator(int index)protected voidrangeCheck(int index, int beyond)Eremove(int index)Eset(int index, E obj)intsize()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
-
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, toArray
-
Methods inherited from interface java.util.List
contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
-
-
-
Field Detail
-
parent
AbstractLinkedList<E> parent
The main list
-
offset
int offset
Offset from the main list
-
size
int size
Sublist size
-
expectedModCount
int expectedModCount
Sublist modCount
-
-
Constructor Detail
-
LinkedSubList
protected LinkedSubList(AbstractLinkedList<E> parent, int fromIndex, int toIndex)
-
-
Method Detail
-
size
public int size()
- Specified by:
sizein interfaceCollection<E>- Specified by:
sizein interfaceList<E>- Specified by:
sizein classAbstractCollection<E>
-
get
public E get(int index)
-
add
public void add(int index, E obj)
-
remove
public E remove(int index)
-
addAll
public boolean addAll(Collection<? extends E> coll)
- Specified by:
addAllin interfaceCollection<E>- Specified by:
addAllin interfaceList<E>- Overrides:
addAllin classAbstractCollection<E>
-
addAll
public boolean addAll(int index, Collection<? extends E> coll)
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<E>- Specified by:
clearin interfaceList<E>- Overrides:
clearin classAbstractList<E>
-
listIterator
public ListIterator<E> listIterator(int index)
- Specified by:
listIteratorin interfaceList<E>- Overrides:
listIteratorin classAbstractList<E>
-
rangeCheck
protected void rangeCheck(int index, int beyond)
-
checkModCount
protected void checkModCount()
-
-