withReadLockAndDelegate() and withWriteLockAndDelegate().
| Modifier and Type | Method and Description |
|---|---|
| public MultiReaderList | |
| public MultiReaderList | newEmpty()
Redeclares org. Creates a new empty mutable version of the same collection type. |
| public MultiReaderList | reverseThis()
Redeclares as abstract: org. Mutates this list by reversing its order and returns the current list as a result. |
| public MultiReaderList | shuffleThis()
Redeclares as abstract: org. Mutates this list by shuffling its elements. |
| public MultiReaderList | shuffleThis(Random random)
Redeclares as abstract: org. Mutates this list by shuffling its elements using the specified random. |
| public default MultiReaderList | sortThis(Comparator<? super T> comparator)
Overrides default org. Sorts the internal data structure of this list and returns the list itself as a convenience. |
| public default MultiReaderList | sortThis()
Overrides default org. Sorts the internal data structure of this list and returns the list itself as a convenience. |
| public <V extends Comparable | sortThisBy(Function<? super T, ? extends V> function)
Redeclares as abstract: org. Sorts the internal data structure of this list based on the natural order of the attribute returned by |
| public MultiReaderList | sortThisByBoolean(BooleanFunction<? super T> function)
Redeclares org.
|
| public MultiReaderList | sortThisByByte(ByteFunction<? super T> function)
Redeclares org.
|
| public MultiReaderList | sortThisByChar(CharFunction<? super T> function)
Redeclares org.
|
| public MultiReaderList | sortThisByDouble(DoubleFunction<? super T> function)
Redeclares org.
|
| public MultiReaderList | sortThisByFloat(FloatFunction<? super T> function)
Redeclares org.
|
| public MultiReaderList | sortThisByInt(IntFunction<? super T> function)
Redeclares org.
|
| public MultiReaderList | sortThisByLong(LongFunction<? super T> function)
Redeclares org.
|
| public MultiReaderList | sortThisByShort(ShortFunction<? super T> function)
Redeclares org.
|
| public MultiReaderList | subList(int fromIndex, int toIndex)
Redeclares org. Returns a view of the portion of this list between the specified
|
| public default MultiReaderList | tap(Procedure<? super T> procedure)
Overrides default org. Executes the Procedure for each element in the iterable and returns |
| public default MultiReaderList | with(T element)
Overrides default org. This method allows mutable and fixed size collections the ability to add elements to their existing elements. |
| public default MultiReaderList | withAll(Iterable<? extends T> elements)
Overrides default org. This method allows mutable and fixed size collections the ability to add multiple elements to their existing elements. |
| public default MultiReaderList | without(T element)
Overrides default org. This method allows mutable and fixed size collections the ability to remove elements from their existing elements. |
| public default MultiReaderList | withoutAll(Iterable<? extends T> elements)
Overrides default org. This method allows mutable and fixed size collections the ability to remove multiple elements from their existing elements. |
| public void | |
| public void |
| clone | back to summary |
|---|---|
| public MultiReaderList Redeclares org.
| |
| newEmpty | back to summary |
|---|---|
| public MultiReaderList Redeclares org. Doc from org. Creates a new empty mutable version of the same collection type. For example, if this instance is a FastList, this method will return a new empty FastList. If the class of this instance is immutable or fixed size (i.e. SingletonList) then a mutable alternative to the class will be provided.
| |
| reverseThis | back to summary |
|---|---|
| public MultiReaderList Redeclares as abstract: org. Doc from org. Mutates this list by reversing its order and returns the current list as a result.
| |
| shuffleThis | back to summary |
|---|---|
| public MultiReaderList Redeclares as abstract: org. Doc from org. Mutates this list by shuffling its elements.
| |
| shuffleThis | back to summary |
|---|---|
| public MultiReaderList Redeclares as abstract: org. Doc from org. Mutates this list by shuffling its elements using the specified random.
| |
| sortThis | back to summary |
|---|---|
| public default MultiReaderList Overrides default org. Doc from org. Sorts the internal data structure of this list and returns the list itself as a convenience.
| |
| sortThis | back to summary |
|---|---|
| public default MultiReaderList Overrides default org. Doc from org. Sorts the internal data structure of this list and returns the list itself as a convenience.
| |
| sortThisBy | back to summary |
|---|---|
| public <V extends Comparable Redeclares as abstract: org. Doc from org. Sorts the internal data structure of this list based on the natural order of the attribute returned by
| |
| sortThisByBoolean | back to summary |
|---|---|
| public MultiReaderList Redeclares org.
| |
| sortThisByByte | back to summary |
|---|---|
| public MultiReaderList Redeclares org.
| |
| sortThisByChar | back to summary |
|---|---|
| public MultiReaderList Redeclares org.
| |
| sortThisByDouble | back to summary |
|---|---|
| public MultiReaderList Redeclares org.
| |
| sortThisByFloat | back to summary |
|---|---|
| public MultiReaderList Redeclares org.
| |
| sortThisByInt | back to summary |
|---|---|
| public MultiReaderList Redeclares org.
| |
| sortThisByLong | back to summary |
|---|---|
| public MultiReaderList Redeclares org.
| |
| sortThisByShort | back to summary |
|---|---|
| public MultiReaderList Redeclares org.
| |
| subList | back to summary |
|---|---|
| public MultiReaderList Redeclares org. Doc from java. Returns a view of the portion of this list between the specified
This method eliminates the need for explicit range operations (of the sort that commonly exist for arrays). Any operation that expects a list can be used as a range operation by passing a subList view instead of a whole list. For example, the following idiom removes a range of elements from a list:
Similar idioms may be constructed for indexOf and
lastIndexOf, and all of the algorithms in the
Collections class can be applied to a subList.The semantics of the list returned by this method become undefined if the backing list (i.e., this list) is structurally modified in any way other than via the returned list. (Structural modifications are those that change the size of this list, or otherwise perturb it in such a fashion that iterations in progress may yield incorrect results.)
| |
| tap | back to summary |
|---|---|
| public default MultiReaderList Overrides default org. Doc from org. Executes the Procedure for each element in the iterable and returns Example using a Java 8 lambda expression:
RichIterable<Person> tapped =
people.tap(person -> LOGGER.info(person.getName()));
| |
| with | back to summary |
|---|---|
| public default MultiReaderList Overrides default org. Doc from org. This method allows mutable and fixed size collections the ability to add elements to their existing elements. In order to support fixed size a new instance of a collection would have to be returned taking the elements of the original collection and appending the new element to form the new collection. In the case of mutable collections, the original collection is modified, and is returned. In order to use this method properly with mutable and fixed size collections the following approach must be taken:
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.
| |
| withAll | back to summary |
|---|---|
| public default MultiReaderList Overrides default org. Doc from org. This method allows mutable and fixed size collections the ability to add multiple elements to their existing elements. In order to support fixed size a new instance of a collection would have to be returned taking the elements of the original collection and appending the new elements to form the new collection. In the case of mutable collections, the original collection is modified, and is returned. In order to use this method properly with mutable and fixed size collections the following approach must be taken:
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.
| |
| without | back to summary |
|---|---|
| public default MultiReaderList Overrides default org. Doc from org. This method allows mutable and fixed size collections the ability to remove elements from their existing elements. In order to support fixed size a new instance of a collection would have to be returned containing the elements that would be left from the original collection after calling remove. In the case of mutable collections, the original collection is modified, and is returned. In order to use this method properly with mutable and fixed size collections the following approach must be taken:
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.
| |
| withoutAll | back to summary |
|---|---|
| public default MultiReaderList Overrides default org. Doc from org. This method allows mutable and fixed size collections the ability to remove multiple elements from their existing elements. In order to support fixed size a new instance of a collection would have to be returned containing the elements that would be left from the original collection after calling removeAll. In the case of mutable collections, the original collection is modified, and is returned. In order to use this method properly with mutable and fixed size collections the following approach must be taken:
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.
| |
| withReadLockAndDelegate | back to summary |
|---|---|
| public void withReadLockAndDelegate(Procedure<? super MutableList<T>> procedure) | |
| withWriteLockAndDelegate | back to summary |
|---|---|
| public void withWriteLockAndDelegate(Procedure<? super MutableList<T>> procedure) | |