Package org.eclipse.collections.api.list
Interface MultiReaderList<T>
- All Superinterfaces:
Cloneable
,Collection<T>
,InternalIterable<T>
,Iterable<T>
,List<T>
,ListIterable<T>
,MutableCollection<T>
,MutableList<T>
,OrderedIterable<T>
,ReversibleIterable<T>
,RichIterable<T>
- All Known Implementing Classes:
MultiReaderFastList
A MultiReaderList provides thread-safe iteration for a list through methods
withReadLockAndDelegate()
and withWriteLockAndDelegate()
.- Since:
- 10.0.
-
Method Summary
Modifier and TypeMethodDescriptionMutates this list by reversing its order and returns the current list as a result.Mutates this list by shuffling its elements.shuffleThis
(Random random) Mutates this list by shuffling its elements using the specified random.default MultiReaderList<T>
sortThis()
Sorts the internal data structure of this list and returns the list itself as a convenience.default MultiReaderList<T>
sortThis
(Comparator<? super T> comparator) Sorts the internal data structure of this list and returns the list itself as a convenience.<V extends Comparable<? super V>>
MultiReaderList<T>sortThisBy
(Function<? super T, ? extends V> function) Sorts the internal data structure of this list based on the natural order of the attribute returned byfunction
.sortThisByBoolean
(BooleanFunction<? super T> function) sortThisByByte
(ByteFunction<? super T> function) sortThisByChar
(CharFunction<? super T> function) sortThisByDouble
(DoubleFunction<? super T> function) sortThisByFloat
(FloatFunction<? super T> function) sortThisByInt
(IntFunction<? super T> function) sortThisByLong
(LongFunction<? super T> function) sortThisByShort
(ShortFunction<? super T> function) void
withReadLockAndDelegate
(Procedure<? super MutableList<T>> procedure) void
withWriteLockAndDelegate
(Procedure<? super MutableList<T>> procedure) Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface org.eclipse.collections.api.InternalIterable
forEach, forEachWith
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, toArray, toArray
Methods inherited from interface org.eclipse.collections.api.list.ListIterable
asParallel, binarySearch, binarySearch, equals, forEachInBoth, get, getFirst, getLast, hashCode, lastIndexOf, listIterator, listIterator
Methods 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, sumByLong
Methods inherited from interface org.eclipse.collections.api.list.MutableList
asSynchronized, asUnmodifiable, clone, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, collectWithIndex, distinct, distinct, distinctBy, drop, dropWhile, flatCollect, flatCollectWith, groupBy, groupByEach, newEmpty, partition, partitionWhile, partitionWith, reject, rejectWith, rejectWithIndex, select, selectInstancesOf, selectWith, selectWithIndex, subList, take, takeWhile, tap, toImmutable, toImmutableList, toReversed, with, withAll, without, withoutAll, zip, zipWithIndex
Methods inherited from interface org.eclipse.collections.api.ordered.OrderedIterable
collectWithIndex, corresponds, detectIndex, forEach, forEachWithIndex, forEachWithIndex, getFirstOptional, getLastOptional, indexOf, max, min, rejectWithIndex, selectWithIndex, toStack, zip, zipWithIndex
Methods inherited from interface org.eclipse.collections.api.ordered.ReversibleIterable
asReversed, detectLastIndex, reverseForEach, reverseForEachWithIndex
Methods inherited from interface org.eclipse.collections.api.RichIterable
aggregateBy, allSatisfy, allSatisfyWith, anySatisfy, 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, count, countBy, countByEach, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, flatCollectWith, forEach, getAny, getOnly, groupBy, groupByAndCollect, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, into, isEmpty, makeString, makeString, makeString, makeString, max, maxBy, maxByOptional, maxOptional, maxOptional, min, minBy, minByOptional, minOptional, minOptional, noneSatisfy, noneSatisfyWith, notEmpty, reduce, reduceInPlace, reduceInPlace, reject, rejectWith, select, selectWith, size, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, 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
-
withReadLockAndDelegate
-
withWriteLockAndDelegate
-
sortThis
Description copied from interface:MutableList
Sorts the internal data structure of this list and returns the list itself as a convenience.- Specified by:
sortThis
in interfaceMutableList<T>
-
sortThis
Description copied from interface:MutableList
Sorts the internal data structure of this list and returns the list itself as a convenience.- Specified by:
sortThis
in interfaceMutableList<T>
-
sortThisBy
<V extends Comparable<? super V>> MultiReaderList<T> sortThisBy(Function<? super T, ? extends V> function) Description copied from interface:MutableList
Sorts the internal data structure of this list based on the natural order of the attribute returned byfunction
.- Specified by:
sortThisBy
in interfaceMutableList<T>
-
sortThisByInt
- Specified by:
sortThisByInt
in interfaceMutableList<T>
-
sortThisByBoolean
- Specified by:
sortThisByBoolean
in interfaceMutableList<T>
-
sortThisByChar
- Specified by:
sortThisByChar
in interfaceMutableList<T>
-
sortThisByByte
- Specified by:
sortThisByByte
in interfaceMutableList<T>
-
sortThisByShort
- Specified by:
sortThisByShort
in interfaceMutableList<T>
-
sortThisByFloat
- Specified by:
sortThisByFloat
in interfaceMutableList<T>
-
sortThisByLong
- Specified by:
sortThisByLong
in interfaceMutableList<T>
-
sortThisByDouble
- Specified by:
sortThisByDouble
in interfaceMutableList<T>
-
reverseThis
MultiReaderList<T> reverseThis()Description copied from interface:MutableList
Mutates this list by reversing its order and returns the current list as a result.- Specified by:
reverseThis
in interfaceMutableList<T>
-
shuffleThis
MultiReaderList<T> shuffleThis()Description copied from interface:MutableList
Mutates this list by shuffling its elements.- Specified by:
shuffleThis
in interfaceMutableList<T>
-
shuffleThis
Description copied from interface:MutableList
Mutates this list by shuffling its elements using the specified random.- Specified by:
shuffleThis
in interfaceMutableList<T>
-