public interface MultiReaderList<T> extends MutableList<T>
withReadLockAndDelegate() and withWriteLockAndDelegate().| Modifier and Type | Method and Description |
|---|---|
MultiReaderList<T> |
clone() |
MultiReaderList<T> |
newEmpty()
Creates a new empty mutable version of the same collection type.
|
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(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>> |
sortThisBy(Function<? super T,? extends V> function)
Sorts the internal data structure of this list based on the natural order of the attribute returned by
function. |
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) |
MultiReaderList<T> |
subList(int fromIndex,
int toIndex) |
default MultiReaderList<T> |
tap(Procedure<? super T> procedure)
Executes the Procedure for each element in the iterable and returns
this. |
default MultiReaderList<T> |
with(T element)
This method allows mutable and fixed size collections the ability to add elements to their existing elements.
|
default MultiReaderList<T> |
withAll(Iterable<? extends T> elements)
This method allows mutable and fixed size collections the ability to add multiple elements to their existing
elements.
|
default MultiReaderList<T> |
without(T element)
This method allows mutable and fixed size collections the ability to remove elements from their existing elements.
|
default MultiReaderList<T> |
withoutAll(Iterable<? extends T> elements)
This method allows mutable and fixed size collections the ability to remove multiple elements from their existing
elements.
|
void |
withReadLockAndDelegate(Procedure<? super MutableList<T>> procedure) |
void |
withWriteLockAndDelegate(Procedure<? super MutableList<T>> procedure) |
asSynchronized, asUnmodifiable, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, collectWithIndex, distinct, distinct, distinctBy, drop, dropWhile, flatCollect, flatCollectWith, groupBy, groupByEach, indexOf, partition, partitionWhile, partitionWith, reject, rejectWith, rejectWithIndex, select, selectInstancesOf, selectWith, selectWithIndex, take, takeWhile, toImmutable, toImmutableList, toReversed, zip, zipWithIndexaddAllIterable, aggregateBy, aggregateInPlaceBy, countBy, countByEach, countByWith, groupByUniqueKey, injectIntoWith, removeAllIterable, removeIf, removeIfWith, retainAllIterable, selectAndRejectWith, sumByDouble, sumByFloat, sumByInt, sumByLongadd, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, toArray, toArrayparallelStream, removeIf, streamasParallel, binarySearch, binarySearch, equals, forEachInBoth, get, getFirst, getLast, hashCode, lastIndexOf, listIterator, listIteratorasReversed, detectLastIndex, reverseForEach, reverseForEachWithIndexcollectWithIndex, corresponds, detectIndex, forEach, forEachWithIndex, forEachWithIndex, getFirstOptional, getLastOptional, rejectWithIndex, selectWithIndex, toStackaggregateBy, 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, 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, toStringforEachWithvoid withReadLockAndDelegate(Procedure<? super MutableList<T>> procedure)
void withWriteLockAndDelegate(Procedure<? super MutableList<T>> procedure)
MultiReaderList<T> newEmpty()
MutableCollectionnewEmpty in interface MutableCollection<T>newEmpty in interface MutableList<T>MultiReaderList<T> clone()
clone in interface MutableList<T>MultiReaderList<T> subList(int fromIndex, int toIndex)
subList in interface List<T>subList in interface ListIterable<T>subList in interface MutableList<T>List.subList(int, int)default MultiReaderList<T> with(T element)
MutableCollection
MutableCollection<String> list = list.with("1");
list = list.with("2");
return list;
In the case of FixedSizeCollection a new instance of MutableCollection will be returned by with, and any
variables that previously referenced the original collection will need to be redirected to reference the
new instance. For other MutableCollection types you will replace the reference to collection with the same
collection, since the instance will return "this" after calling add on itself.with in interface MutableCollection<T>with in interface MutableList<T>Collection.add(Object)default MultiReaderList<T> without(T element)
MutableCollection
MutableCollection<String> list = list.without("1");
list = list.without("2");
return list;
In the case of FixedSizeCollection a new instance of MutableCollection will be returned by without, and
any variables that previously referenced the original collection will need to be redirected to reference the
new instance. For other MutableCollection types you will replace the reference to collection with the same
collection, since the instance will return "this" after calling remove on itself.without in interface MutableCollection<T>without in interface MutableList<T>Collection.remove(Object)default MultiReaderList<T> withAll(Iterable<? extends T> elements)
MutableCollection
MutableCollection<String> list = list.withAll(FastList.newListWith("1", "2"));
In the case of FixedSizeCollection a new instance of MutableCollection will be returned by withAll, and
any variables that previously referenced the original collection will need to be redirected to reference the
new instance. For other MutableCollection types you will replace the reference to collection with the same
collection, since the instance will return "this" after calling addAll on itself.withAll in interface MutableCollection<T>withAll in interface MutableList<T>Collection.addAll(Collection)default MultiReaderList<T> withoutAll(Iterable<? extends T> elements)
MutableCollection
MutableCollection<String> list = list.withoutAll(FastList.newListWith("1", "2"));
In the case of FixedSizeCollection a new instance of MutableCollection will be returned by withoutAll,
and any variables that previously referenced the original collection will need to be redirected to reference the
new instance. For other MutableCollection types you will replace the reference to collection with the same
collection, since the instance will return "this" after calling removeAll on itself.withoutAll in interface MutableCollection<T>withoutAll in interface MutableList<T>Collection.removeAll(Collection)default MultiReaderList<T> tap(Procedure<? super T> procedure)
RichIterablethis.
Example using a Java 8 lambda expression:
RichIterable<Person> tapped =
people.tap(person -> LOGGER.info(person.getName()));
tap in interface ListIterable<T>tap in interface MutableCollection<T>tap in interface MutableList<T>tap in interface OrderedIterable<T>tap in interface ReversibleIterable<T>tap in interface RichIterable<T>RichIterable.each(Procedure),
RichIterable.forEach(Procedure)default MultiReaderList<T> sortThis(Comparator<? super T> comparator)
MutableListsortThis in interface MutableList<T>default MultiReaderList<T> sortThis()
MutableListsortThis in interface MutableList<T><V extends Comparable<? super V>> MultiReaderList<T> sortThisBy(Function<? super T,? extends V> function)
MutableListfunction.sortThisBy in interface MutableList<T>MultiReaderList<T> sortThisByInt(IntFunction<? super T> function)
sortThisByInt in interface MutableList<T>MultiReaderList<T> sortThisByBoolean(BooleanFunction<? super T> function)
sortThisByBoolean in interface MutableList<T>MultiReaderList<T> sortThisByChar(CharFunction<? super T> function)
sortThisByChar in interface MutableList<T>MultiReaderList<T> sortThisByByte(ByteFunction<? super T> function)
sortThisByByte in interface MutableList<T>MultiReaderList<T> sortThisByShort(ShortFunction<? super T> function)
sortThisByShort in interface MutableList<T>MultiReaderList<T> sortThisByFloat(FloatFunction<? super T> function)
sortThisByFloat in interface MutableList<T>MultiReaderList<T> sortThisByLong(LongFunction<? super T> function)
sortThisByLong in interface MutableList<T>MultiReaderList<T> sortThisByDouble(DoubleFunction<? super T> function)
sortThisByDouble in interface MutableList<T>MultiReaderList<T> reverseThis()
MutableListreverseThis in interface MutableList<T>MultiReaderList<T> shuffleThis()
MutableListshuffleThis in interface MutableList<T>MultiReaderList<T> shuffleThis(Random random)
MutableListshuffleThis in interface MutableList<T>Copyright © 2004–2023. All rights reserved.