| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | add(T element)
Implements java. Ensures that this collection contains the specified element (optional operation). |
| public boolean | addAll(Collection<? extends T> source)
Implements java. Adds all of the elements in the specified collection to this collection (optional operation). |
| public boolean | addAllIterable(Iterable<? extends T> iterable)
Implements org.
|
| public RichIterable | chunk(int size)
Implements org. Partitions elements in fixed size chunks. |
| public <V> MutableBag | countBy(Function<? super T, ? extends V> function)
Overrides default org. This method will count the number of occurrences of each value calculated by applying the function to each element of the collection. |
| public <V> MutableBag | countByEach(Function<? super T, ? extends Iterable<V>> function)
Overrides org. Overrides default org. This method will count the number of occurrences of each value calculated by applying the function to each element of the collection. |
| public <V, P> MutableBag | countByWith(Function2<? super T, ? super P, ? extends V> function, P parameter)
Overrides default org. This method will count the number of occurrences of each value calculated by applying the function to each element of the collection with the specified parameter as the second argument. |
| public <V> MutableMap | groupByUniqueKey(Function<? super T, ? extends V> function)
Overrides default org. Implements org. For each element of the iterable, the function is evaluated, and the results of these evaluations are collected into a new map, where the transformed value is the key. |
| public <IV, P> IV | injectIntoWith(IV injectValue, Function3<? super IV, ? super T, ? super P, ? extends IV> function, P parameter)
Implements org. Returns the final result of evaluating function using each element of the iterable, the previous evaluation result and the parameters. |
| public Optional | reduce(BinaryOperator<T> accumulator)
Overrides default org. This method produces the equivalent result as |
| public boolean | remove(Object o)
Implements java. Removes a single instance of the specified element from this collection, if it is present (optional operation). |
| public boolean | removeAll(Collection<?> source)
Implements java. Removes all of this collection's elements that are also contained in the specified collection (optional operation). |
| public boolean | removeAllIterable(Iterable<?> iterable)
Implements org.
|
| public boolean | removeIf(Predicate<? super T> predicate)
Implements org. Removes all elements in the collection that evaluate to true for the specified predicate. |
| public <P> boolean | removeIfWith(Predicate2<? super T, ? super P> predicate, P parameter)
Implements org. Removes all elements in the collection that evaluate to true for the specified predicate2 and parameter. |
| public boolean | retainAll(Collection<?> source)
Implements java. Retains only the elements in this collection that are contained in the specified collection (optional operation). |
| public boolean | retainAllIterable(Iterable<?> iterable)
Implements org.
|
| public <P> Twin | selectAndRejectWith(Predicate2<? super T, ? super P> predicate, P parameter)
Implements org. Filters a collection into two separate collections based on a predicate returned via a Pair. |
| public <V> MutableObjectDoubleMap | sumByDouble(Function<? super T, ? extends V> groupBy, DoubleFunction<? super T> function)
Implements org. Groups and sums the values using the two specified functions. |
| public <V> MutableObjectDoubleMap | sumByFloat(Function<? super T, ? extends V> groupBy, FloatFunction<? super T> function)
Implements org. Groups and sums the values using the two specified functions. |
| public <V> MutableObjectLongMap | sumByInt(Function<? super T, ? extends V> groupBy, IntFunction<? super T> function)
Implements org. Groups and sums the values using the two specified functions. |
| public <V> MutableObjectLongMap | sumByLong(Function<? super T, ? extends V> groupBy, LongFunction<? super T> function)
Implements org. Groups and sums the values using the two specified functions. |
| AbstractMutableCollection | back to summary |
|---|---|
| public AbstractMutableCollection() | |
| add | back to summary |
|---|---|
| public boolean add(T element) Implements java. Doc from java. Ensures that this collection contains the specified element (optional
operation). Returns
Collections that support this operation may place limitations on what
elements may be added to this collection. In particular, some
collections will refuse to add
If a collection refuses to add a particular element for any reason
other than that it already contains the element, it must throw
an exception (rather than returning
| |
| addAll | back to summary |
|---|---|
| public boolean addAll(Collection<? extends T> source) Implements java. Doc from java. Adds all of the elements in the specified collection to this collection (optional operation). The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified collection is this collection, and this collection is nonempty.) If the specified collection has a defined encounter order, processing of its elements generally occurs in that order.
| |
| addAllIterable | back to summary |
|---|---|
| public boolean addAllIterable(Iterable<? extends T> iterable) Implements org.
| |
| chunk | back to summary |
|---|---|
| public RichIterable Implements org. Doc from org. Partitions elements in fixed size chunks.
| |
| countBy | back to summary |
|---|---|
| public <V> MutableBag Overrides default org. Doc from org. This method will count the number of occurrences of each value calculated by applying the function to each element of the collection.
| |
| countByEach | back to summary |
|---|---|
| public <V> MutableBag Overrides org. Overrides default org. Doc from org. This method will count the number of occurrences of each value calculated by applying the function to each element of the collection.
| |
| countByWith | back to summary |
|---|---|
| public <V, P> MutableBag Overrides default org. Doc from org. This method will count the number of occurrences of each value calculated by applying the function to each element of the collection with the specified parameter as the second argument.
| |
| groupByUniqueKey | back to summary |
|---|---|
| public <V> MutableMap Overrides default org. Implements org. Doc from org. For each element of the iterable, the function is evaluated, and the results of these evaluations are collected into a new map, where the transformed value is the key. The generated keys must each be unique, or else an exception is thrown.
| |
| injectIntoWith | back to summary |
|---|---|
| public <IV, P> IV injectIntoWith(IV injectValue, Function3<? super IV, ? super T, ? super P, ? extends IV> function, P parameter) Implements org. Doc from org. Returns the final result of evaluating function using each element of the iterable, the previous evaluation result and the parameters. The injected value is used for the first parameter of the first evaluation, and the current item in the iterable is used as the second parameter. The parameter value is always used as the third parameter to the function call.
| |
| reduce | back to summary |
|---|---|
| public Optional Overrides default org. Doc from org. This method produces the equivalent result as
| |
| remove | back to summary |
|---|---|
| public boolean remove(Object o) Implements java. Doc from java. Removes a single instance of the specified element from this
collection, if it is present (optional operation). More formally,
removes an element
| |
| removeAll | back to summary |
|---|---|
| public boolean removeAll(Collection<?> source) Implements java. Doc from java. Removes all of this collection's elements that are also contained in the specified collection (optional operation). After this call returns, this collection will contain no elements in common with the specified collection.
| |
| removeAllIterable | back to summary |
|---|---|
| public boolean removeAllIterable(Iterable<?> iterable) Implements org.
| |
| removeIf | back to summary |
|---|---|
| public boolean removeIf(Predicate<? super T> predicate) Implements org. Doc from org. Removes all elements in the collection that evaluate to true for the specified predicate. e.g. return lastNames.removeIf(Predicates.isNull());
| |
| removeIfWith | back to summary |
|---|---|
| public <P> boolean removeIfWith(Predicate2<? super T, ? super P> predicate, P parameter) Implements org. Doc from org. Removes all elements in the collection that evaluate to true for the specified predicate2 and parameter. return lastNames.removeIfWith(Predicates2.isNull(), null);
| |
| retainAll | back to summary |
|---|---|
| public boolean retainAll(Collection<?> source) Implements java. Doc from java. Retains only the elements in this collection that are contained in the specified collection (optional operation). In other words, removes from this collection all of its elements that are not contained in the specified collection.
| |
| retainAllIterable | back to summary |
|---|---|
| public boolean retainAllIterable(Iterable<?> iterable) Implements org.
| |
| selectAndRejectWith | back to summary |
|---|---|
| public <P> Twin Implements org. Doc from org. Filters a collection into two separate collections based on a predicate returned via a Pair. e.g. return lastNames.selectAndRejectWith(Predicates2.lessThan(), "Mason");
| |
| sumByDouble | back to summary |
|---|---|
| public <V> MutableObjectDoubleMap Implements org. Doc from org. Groups and sums the values using the two specified functions.
| |
| sumByFloat | back to summary |
|---|---|
| public <V> MutableObjectDoubleMap Implements org. Doc from org. Groups and sums the values using the two specified functions.
| |
| sumByInt | back to summary |
|---|---|
| public <V> MutableObjectLongMap Implements org. Doc from org. Groups and sums the values using the two specified functions.
| |
| sumByLong | back to summary |
|---|---|
| public <V> MutableObjectLongMap Implements org. Doc from org. Groups and sums the values using the two specified functions.
| |