Class ListAdapter<T>
java.lang.Object
org.eclipse.collections.impl.collection.mutable.AbstractCollectionAdapter<T>
org.eclipse.collections.impl.list.mutable.AbstractListAdapter<T>
org.eclipse.collections.impl.list.mutable.ListAdapter<T>
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<T>,Collection<T>,List<T>,MutableCollection<T>,InternalIterable<T>,ListIterable<T>,MutableList<T>,OrderedIterable<T>,ReversibleIterable<T>,RichIterable<T>
This class provides a MutableList wrapper around a JDK Collections List interface instance. All the MutableList
interface methods are supported in addition to the JDK List interface methods.
To create a new wrapper around an existing List instance, use the adapt(List) factory method.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E> MutableList<E>booleanallSatisfy(Predicate<? super T> predicate) booleananySatisfy(Predicate<? super T> predicate) asParallel(ExecutorService executorService, int batchSize) clone()<S> booleancorresponds(OrderedIterable<S> other, Predicate2<? super T, ? super S> predicate) intdetectIfNone(Predicate<? super T> predicate, Function0<? extends T> function) intdetectIndex(Predicate<? super T> predicate) intdetectLastIndex(Predicate<? super T> predicate) distinct()distinct(HashingStrategy<? super T> hashingStrategy) drop(int count) voidvoidvoidforEachWithIndex(int fromIndex, int toIndex, ObjectIntProcedure<? super T> objectIntProcedure) voidforEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure) <IV> IVinjectInto(IV injectedValue, Function2<? super IV, ? super T, ? extends IV> function) newEmpty()Deprecated.booleannoneSatisfy(Predicate<? super T> predicate) partitionWhile(Predicate<? super T> predicate) voidreverseForEach(Procedure<? super T> procedure) voidreverseForEachWithIndex(ObjectIntProcedure<? super T> procedure) <S> MutableList<S>selectInstancesOf(Class<S> clazz) voidsort(Comparator<? super T> comparator) sortThis()sortThis(Comparator<? super T> comparator) take(int count) withoutAll(Iterable<? extends T> elements) Methods inherited from class org.eclipse.collections.impl.list.mutable.AbstractListAdapter
add, addAll, asReversed, collect, collectIf, collectWith, distinctBy, equals, flatCollect, get, groupBy, groupByEach, hashCode, indexOf, lastIndexOf, listIterator, listIterator, partition, partitionWith, reject, rejectWith, remove, select, selectWith, set, sortThisByBoolean, sortThisByByte, sortThisByChar, sortThisByDouble, sortThisByFloat, sortThisByInt, sortThisByLong, sortThisByShort, subList, tap, toStack, zip, zipWithIndexMethods inherited from class org.eclipse.collections.impl.collection.mutable.AbstractCollectionAdapter
add, addAll, addAllIterable, allSatisfyWith, anySatisfyWith, appendString, asLazy, chunk, clear, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, countWith, detectOptional, detectWith, detectWithIfNone, detectWithOptional, flatCollect, forEachWith, getFirst, getLast, getOnly, groupBy, groupByEach, groupByUniqueKey, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectIntoWith, into, isEmpty, iterator, max, max, maxBy, min, min, minBy, noneSatisfyWith, notEmpty, reject, rejectWith, remove, removeAll, removeAllIterable, removeIf, removeIfWith, retainAll, retainAllIterable, select, selectAndRejectWith, selectWith, size, sumByDouble, sumByFloat, sumByInt, sumByLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toBiMap, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedList, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toString, zip, zipWithIndexMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface org.eclipse.collections.api.InternalIterable
forEach, forEachWithMethods inherited from interface java.util.List
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, replaceAll, retainAll, size, spliteratorMethods inherited from interface org.eclipse.collections.api.list.ListIterable
binarySearch, binarySearch, forEachInBothMethods inherited from interface org.eclipse.collections.api.collection.MutableCollection
addAllIterable, aggregateBy, aggregateInPlaceBy, countBy, countByEach, countByWith, groupByUniqueKey, injectIntoWith, removeAllIterable, removeIf, removeIfWith, retainAllIterable, selectAndRejectWith, sumByDouble, sumByFloat, sumByInt, sumByLongMethods inherited from interface org.eclipse.collections.api.list.MutableList
collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, collectWithIndex, flatCollectWith, getFirst, getLast, rejectWithIndex, reverseThis, selectWithIndex, shuffleThis, shuffleThis, sortThisBy, toArray, toArray, toImmutableList, toReversedMethods inherited from interface org.eclipse.collections.api.ordered.OrderedIterable
collectWithIndex, getFirstOptional, getLastOptional, max, min, rejectWithIndex, selectWithIndex, zip, zipWithIndexMethods inherited from interface org.eclipse.collections.api.RichIterable
aggregateBy, allSatisfyWith, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, containsAny, containsAnyIterable, containsBy, containsNone, containsNoneIterable, countBy, countByEach, countByWith, countWith, detectOptional, detectWith, detectWithIfNone, detectWithOptional, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, flatCollectWith, forEach, getAny, getOnly, groupBy, groupByAndCollect, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, into, isEmpty, makeString, makeString, makeString, makeString, max, maxBy, maxByOptional, maxOptional, maxOptional, min, minBy, minByOptional, minOptional, minOptional, noneSatisfyWith, notEmpty, reduce, reduceBy, reduceBy, reduceInPlace, reduceInPlace, reject, rejectWith, select, selectWith, size, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toBag, toBiMap, toImmutableBag, toImmutableBiMap, toImmutableMap, toImmutableSet, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedListBy, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toString
-
Method Details
-
adapt
-
toImmutable
- Specified by:
toImmutablein interfaceListIterable<T>- Specified by:
toImmutablein interfaceMutableCollection<T>- Specified by:
toImmutablein interfaceMutableList<T>
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableCollection<T>- Specified by:
asUnmodifiablein interfaceMutableList<T>
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableCollection<T>- Specified by:
asSynchronizedin interfaceMutableList<T>
-
clone
- Specified by:
clonein interfaceMutableList<T>- Overrides:
clonein classAbstractListAdapter<T>
-
newEmpty
Deprecated.useFastList.newList()instead (inlineable)- Specified by:
newEmptyin interfaceMutableCollection<T>- Specified by:
newEmptyin interfaceMutableList<T>
-
each
- Specified by:
eachin interfaceRichIterable<T>- Overrides:
eachin classAbstractCollectionAdapter<T>
-
reverseForEach
- Specified by:
reverseForEachin interfaceReversibleIterable<T>
-
reverseForEachWithIndex
- Specified by:
reverseForEachWithIndexin interfaceReversibleIterable<T>
-
forEachWithIndex
- Specified by:
forEachWithIndexin interfaceInternalIterable<T>- Specified by:
forEachWithIndexin interfaceOrderedIterable<T>- Overrides:
forEachWithIndexin classAbstractCollectionAdapter<T>
-
forEachWithIndex
public void forEachWithIndex(int fromIndex, int toIndex, ObjectIntProcedure<? super T> objectIntProcedure) - Specified by:
forEachWithIndexin interfaceOrderedIterable<T>
-
detect
- Specified by:
detectin interfaceRichIterable<T>- Overrides:
detectin classAbstractCollectionAdapter<T>
-
detectIfNone
- Specified by:
detectIfNonein interfaceRichIterable<T>- Overrides:
detectIfNonein classAbstractCollectionAdapter<T>
-
detectIndex
- Specified by:
detectIndexin interfaceOrderedIterable<T>
-
detectLastIndex
- Specified by:
detectLastIndexin interfaceReversibleIterable<T>
-
count
- Specified by:
countin interfaceRichIterable<T>- Overrides:
countin classAbstractCollectionAdapter<T>
-
corresponds
- Specified by:
correspondsin interfaceOrderedIterable<T>
-
anySatisfy
- Specified by:
anySatisfyin interfaceRichIterable<T>- Overrides:
anySatisfyin classAbstractCollectionAdapter<T>
-
allSatisfy
- Specified by:
allSatisfyin interfaceRichIterable<T>- Overrides:
allSatisfyin classAbstractCollectionAdapter<T>
-
noneSatisfy
- Specified by:
noneSatisfyin interfaceRichIterable<T>- Overrides:
noneSatisfyin classAbstractCollectionAdapter<T>
-
injectInto
- Specified by:
injectIntoin interfaceRichIterable<T>- Overrides:
injectIntoin classAbstractCollectionAdapter<T>
-
forEach
- Specified by:
forEachin interfaceOrderedIterable<T>
-
sort
-
sortThis
- Specified by:
sortThisin interfaceMutableList<T>- Since:
- 10.0
-
sortThis
- Specified by:
sortThisin interfaceMutableList<T>- Since:
- 10.0
-
with
- Specified by:
within interfaceMutableCollection<T>- Specified by:
within interfaceMutableList<T>
-
with
-
with
-
with
-
without
- Specified by:
withoutin interfaceMutableCollection<T>- Specified by:
withoutin interfaceMutableList<T>
-
withAll
- Specified by:
withAllin interfaceMutableCollection<T>- Specified by:
withAllin interfaceMutableList<T>
-
withoutAll
- Specified by:
withoutAllin interfaceMutableCollection<T>- Specified by:
withoutAllin interfaceMutableList<T>
-
selectInstancesOf
- Specified by:
selectInstancesOfin interfaceListIterable<T>- Specified by:
selectInstancesOfin interfaceMutableCollection<T>- Specified by:
selectInstancesOfin interfaceMutableList<T>- Specified by:
selectInstancesOfin interfaceOrderedIterable<T>- Specified by:
selectInstancesOfin interfaceReversibleIterable<T>- Specified by:
selectInstancesOfin interfaceRichIterable<T>- Overrides:
selectInstancesOfin classAbstractListAdapter<T>
-
distinct
- Specified by:
distinctin interfaceListIterable<T>- Specified by:
distinctin interfaceMutableList<T>- Specified by:
distinctin interfaceOrderedIterable<T>- Specified by:
distinctin interfaceReversibleIterable<T>
-
distinct
- Specified by:
distinctin interfaceListIterable<T>- Specified by:
distinctin interfaceMutableList<T>
-
take
- Specified by:
takein interfaceListIterable<T>- Specified by:
takein interfaceMutableList<T>- Specified by:
takein interfaceReversibleIterable<T>
-
takeWhile
- Specified by:
takeWhilein interfaceListIterable<T>- Specified by:
takeWhilein interfaceMutableList<T>- Specified by:
takeWhilein interfaceOrderedIterable<T>- Specified by:
takeWhilein interfaceReversibleIterable<T>
-
drop
- Specified by:
dropin interfaceListIterable<T>- Specified by:
dropin interfaceMutableList<T>- Specified by:
dropin interfaceReversibleIterable<T>
-
dropWhile
- Specified by:
dropWhilein interfaceListIterable<T>- Specified by:
dropWhilein interfaceMutableList<T>- Specified by:
dropWhilein interfaceOrderedIterable<T>- Specified by:
dropWhilein interfaceReversibleIterable<T>
-
partitionWhile
- Specified by:
partitionWhilein interfaceListIterable<T>- Specified by:
partitionWhilein interfaceMutableList<T>- Specified by:
partitionWhilein interfaceOrderedIterable<T>- Specified by:
partitionWhilein interfaceReversibleIterable<T>
-
asParallel
- Specified by:
asParallelin interfaceListIterable<T>- Overrides:
asParallelin classAbstractListAdapter<T>
-
FastList.newList()instead (inlineable)