Class AbstractMutableList.SubList<T>
java.lang.Object
org.eclipse.collections.impl.AbstractRichIterable<T>
org.eclipse.collections.impl.collection.mutable.AbstractMutableCollection<T>
org.eclipse.collections.impl.list.mutable.AbstractMutableList<T>
org.eclipse.collections.impl.list.mutable.AbstractMutableList.SubList<T>
- All Implemented Interfaces:
Serializable, Cloneable, Iterable<T>, Collection<T>, List<T>, RandomAccess, SequencedCollection<T>, MutableCollection<T>, InternalIterable<T>, ListIterable<T>, MutableList<T>, OrderedIterable<T>, ReversibleIterable<T>, RichIterable<T>
- Direct Known Subclasses:
AbstractMemoryEfficientMutableList.SubList
- Enclosing class:
AbstractMutableList<T>
protected static class AbstractMutableList.SubList<T>
extends AbstractMutableList<T>
implements Serializable, RandomAccess
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractMutableList
AbstractMutableList.SubList<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final AbstractMutableList<T> private final AbstractMutableList.SubList<T> private static final longprivate int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSubList(AbstractMutableList.SubList<T> parent, int fromIndex, int toIndex) protectedSubList(AbstractMutableList<T> list, int fromIndex, int toIndex) -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection<? extends T> collection) booleanaddAll(Collection<? extends T> collection) private voidcheckIfOutOfBounds(int index) voidclear()clone()get(int index) Returns the item at the specified position in this list iterable.getFirst()Returns the first element of an iterable.getLast()Returns the last element of an iterable.iterator()listIterator(int index) remove(int index) intsize()Returns the number of items in this iterable.subList(int fromIndex, int toIndex) Returns a new MutableList in reverse order.toStack()Converts the OrderedIterable to a mutable MutableStack implementation.private voidupdateSize(int sizeChange) protected ObjectMethods inherited from class AbstractMutableList
allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, asParallel, asReversed, asSynchronized, asUnmodifiable, binarySearch, chunk, collect, collectIf, collectWith, contains, containsAll, corresponds, count, countWith, detect, detectIndex, detectLastIndex, detectOptional, detectWith, detectWithOptional, distinct, distinct, distinctBy, drop, dropWhile, each, equals, flatCollect, forEach, forEachWith, forEachWithIndex, forEachWithIndex, groupBy, groupByEach, groupByUniqueKey, hashCode, indexOf, injectInto, injectInto, injectInto, injectInto, injectIntoWith, lastIndexOf, listIterator, max, max, maxBy, min, min, minBy, newEmpty, noneSatisfy, noneSatisfyWith, partition, partitionWhile, partitionWith, reject, rejectWith, removeAll, removeIf, removeIfWith, removeRange, retainAll, select, selectAndRejectWith, selectInstancesOf, selectWith, sortThisByBoolean, sortThisByByte, sortThisByChar, sortThisByDouble, sortThisByFloat, sortThisByInt, sortThisByLong, sortThisByShort, subListRangeCheck, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, take, takeWhile, tap, toSet, toSortedList, zip, zip, zipWithIndex, zipWithIndexMethods inherited from class AbstractMutableCollection
addAllIterable, countBy, countByEach, countByWith, reduce, remove, removeAllIterable, retainAllIterable, sumByDouble, sumByFloat, sumByInt, sumByLongMethods inherited from class AbstractRichIterable
asLazy, containsAllArguments, containsAllIterable, detectWithIfNone, forEach, groupBy, groupByEach, groupByUniqueKey, injectInto, into, isEmpty, toBag, toBiMap, toList, toMap, toSortedBag, toSortedBag, toSortedBagBy, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toStringMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface InternalIterable
forEachMethods inherited from interface List
addFirst, addLast, isEmpty, remove, removeFirst, removeLast, replaceAll, reversed, sort, spliteratorMethods inherited from interface ListIterable
binarySearch, forEachInBothMethods inherited from interface MutableCollection
addAllIterable, aggregateBy, aggregateInPlaceBy, countBy, countByEach, countByWith, removeAllIterable, retainAllIterable, sumByDouble, sumByFloat, sumByInt, sumByLongMethods inherited from interface MutableList
collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, collectWithIndex, flatCollect, flatCollectWith, reject, rejectWith, rejectWithIndex, reverseThis, select, selectWith, selectWithIndex, shuffleThis, shuffleThis, sortThis, sortThis, sortThisBy, toArray, toArray, toImmutable, toImmutableList, with, withAll, without, withoutAllMethods inherited from interface OrderedIterable
collectWithIndex, getFirstOptional, getLastOptional, rejectWithIndex, selectWithIndexMethods inherited from interface ReversibleIterable
reverseForEach, reverseForEachWithIndexMethods inherited from interface RichIterable
aggregateBy, appendString, asLazy, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAllArguments, containsAllIterable, containsAny, containsAnyIterable, containsBy, containsNone, containsNoneIterable, countBy, countByEach, countByWith, detectIfNone, detectWithIfNone, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, flatCollectWith, forEach, getAny, getOnly, groupBy, groupByAndCollect, groupByEach, groupByUniqueKey, injectInto, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, into, isEmpty, makeString, makeString, makeString, makeString, maxByOptional, maxOptional, maxOptional, minByOptional, minOptional, minOptional, notEmpty, reduce, reduceBy, reduceBy, reduceInPlace, reduceInPlace, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, toArray, toArray, toBag, toBiMap, toImmutableBag, toImmutableBiMap, toImmutableMap, toImmutableSet, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedListBy, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toList, toMap, toMap, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
original
-
parent
-
offset
private final int offset -
size
private int size
-
-
Constructor Details
-
SubList
-
SubList
-
-
Method Details
-
subList
- Specified by:
subListin interfaceList<T>- Specified by:
subListin interfaceListIterable<T>- Specified by:
subListin interfaceMutableList<T>- Overrides:
subListin classAbstractMutableList<T>- See Also:
-
toReversed
Description copied from interface:MutableListReturns a new MutableList in reverse order.- Specified by:
toReversedin interfaceListIterable<T>- Specified by:
toReversedin interfaceMutableList<T>- Specified by:
toReversedin interfaceReversibleIterable<T>
-
writeReplace
-
add
- Specified by:
addin interfaceCollection<T>- Specified by:
addin interfaceList<T>- Overrides:
addin classAbstractMutableCollection<T>
-
set
-
get
Description copied from interface:ListIterableReturns the item at the specified position in this list iterable. -
size
public int size()Description copied from interface:RichIterableReturns the number of items in this iterable.- Specified by:
sizein interfaceCollection<T>- Specified by:
sizein interfaceList<T>- Specified by:
sizein interfaceRichIterable<T>
-
add
-
remove
-
clear
public void clear()- Specified by:
clearin interfaceCollection<T>- Specified by:
clearin interfaceList<T>- Overrides:
clearin classAbstractMutableList<T>
-
addAll
- Specified by:
addAllin interfaceCollection<T>- Specified by:
addAllin interfaceList<T>- Overrides:
addAllin classAbstractMutableCollection<T>
-
addAll
-
updateSize
private void updateSize(int sizeChange) -
iterator
-
listIterator
- Specified by:
listIteratorin interfaceList<T>- Specified by:
listIteratorin interfaceListIterable<T>- Overrides:
listIteratorin classAbstractMutableList<T>- See Also:
-
checkIfOutOfBounds
private void checkIfOutOfBounds(int index) -
clone
- Specified by:
clonein interfaceMutableList<T>- Overrides:
clonein classAbstractMutableList<T>
-
getFirst
Description copied from interface:RichIterableReturns the first element of an iterable. In the case of a List it is the element at the first index. In the case of any other Collection, it is the first element that would be returned during an iteration. If the iterable is empty, null is returned. If null is a valid element of the container, then a developer would need to check to see if the iterable is empty to validate that a null result was not due to the container being empty.The order of Sets are not guaranteed (except for TreeSets and other Ordered Set implementations), so if you use this method, the first element could be any element from the Set.
- Specified by:
getFirstin interfaceList<T>- Specified by:
getFirstin interfaceListIterable<T>- Specified by:
getFirstin interfaceMutableList<T>- Specified by:
getFirstin interfaceOrderedIterable<T>- Specified by:
getFirstin interfaceRichIterable<T>- Specified by:
getFirstin interfaceSequencedCollection<T>- Overrides:
getFirstin classAbstractMutableList<T>
-
getLast
Description copied from interface:RichIterableReturns the last element of an iterable. In the case of a List it is the element at the last index. In the case of any other Collection, it is the last element that would be returned during an iteration. If the iterable is empty, null is returned. If null is a valid element of the container, then a developer would need to check to see if the iterable is empty to validate that a null result was not due to the container being empty.The order of Sets are not guaranteed (except for TreeSets and other Ordered Set implementations), so if you use this method, the last element could be any element from the Set.
- Specified by:
getLastin interfaceList<T>- Specified by:
getLastin interfaceListIterable<T>- Specified by:
getLastin interfaceMutableList<T>- Specified by:
getLastin interfaceOrderedIterable<T>- Specified by:
getLastin interfaceRichIterable<T>- Specified by:
getLastin interfaceSequencedCollection<T>- Overrides:
getLastin classAbstractMutableList<T>
-
toStack
Description copied from interface:OrderedIterableConverts the OrderedIterable to a mutable MutableStack implementation.- Specified by:
toStackin interfaceOrderedIterable<T>
-