Package org.eclipse.collections.api.list
Interface MultiReaderList<T>
-
- All Superinterfaces:
java.lang.Cloneable
,java.util.Collection<T>
,InternalIterable<T>
,java.lang.Iterable<T>
,java.util.List<T>
,ListIterable<T>
,MutableCollection<T>
,MutableList<T>
,OrderedIterable<T>
,ReversibleIterable<T>
,RichIterable<T>
- All Known Implementing Classes:
MultiReaderFastList
public interface MultiReaderList<T> extends MutableList<T>
A MultiReaderList provides thread-safe iteration for a list through methodswithReadLockAndDelegate()
andwithWriteLockAndDelegate()
.- Since:
- 10.0.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description MultiReaderList<T>
reverseThis()
Mutates this list by reversing its order and returns the current list as a result.MultiReaderList<T>
shuffleThis()
Mutates this list by shuffling its elements.MultiReaderList<T>
shuffleThis(java.util.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(java.util.Comparator<? super T> comparator)
Sorts the internal data structure of this list and returns the list itself as a convenience.<V extends java.lang.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
.MultiReaderList<T>
sortThisByBoolean(BooleanFunction<? super T> function)
MultiReaderList<T>
sortThisByByte(ByteFunction<? super T> function)
MultiReaderList<T>
sortThisByChar(CharFunction<? super T> function)
MultiReaderList<T>
sortThisByDouble(DoubleFunction<? super T> function)
MultiReaderList<T>
sortThisByFloat(FloatFunction<? super T> function)
MultiReaderList<T>
sortThisByInt(IntFunction<? super T> function)
MultiReaderList<T>
sortThisByLong(LongFunction<? super T> function)
MultiReaderList<T>
sortThisByShort(ShortFunction<? super T> function)
void
withReadLockAndDelegate(Procedure<? super MutableList<T>> procedure)
void
withWriteLockAndDelegate(Procedure<? super MutableList<T>> procedure)
-
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 Detail
-
withReadLockAndDelegate
void withReadLockAndDelegate(Procedure<? super MutableList<T>> procedure)
-
withWriteLockAndDelegate
void withWriteLockAndDelegate(Procedure<? super MutableList<T>> procedure)
-
sortThis
default MultiReaderList<T> sortThis(java.util.Comparator<? super T> comparator)
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
default MultiReaderList<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 java.lang.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
MultiReaderList<T> sortThisByInt(IntFunction<? super T> function)
- Specified by:
sortThisByInt
in interfaceMutableList<T>
-
sortThisByBoolean
MultiReaderList<T> sortThisByBoolean(BooleanFunction<? super T> function)
- Specified by:
sortThisByBoolean
in interfaceMutableList<T>
-
sortThisByChar
MultiReaderList<T> sortThisByChar(CharFunction<? super T> function)
- Specified by:
sortThisByChar
in interfaceMutableList<T>
-
sortThisByByte
MultiReaderList<T> sortThisByByte(ByteFunction<? super T> function)
- Specified by:
sortThisByByte
in interfaceMutableList<T>
-
sortThisByShort
MultiReaderList<T> sortThisByShort(ShortFunction<? super T> function)
- Specified by:
sortThisByShort
in interfaceMutableList<T>
-
sortThisByFloat
MultiReaderList<T> sortThisByFloat(FloatFunction<? super T> function)
- Specified by:
sortThisByFloat
in interfaceMutableList<T>
-
sortThisByLong
MultiReaderList<T> sortThisByLong(LongFunction<? super T> function)
- Specified by:
sortThisByLong
in interfaceMutableList<T>
-
sortThisByDouble
MultiReaderList<T> sortThisByDouble(DoubleFunction<? super T> function)
- 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
MultiReaderList<T> shuffleThis(java.util.Random random)
Description copied from interface:MutableList
Mutates this list by shuffling its elements using the specified random.- Specified by:
shuffleThis
in interfaceMutableList<T>
-
-