| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | add(T t)
Implements java. Ensures that this collection contains the specified element (optional operation). |
| public boolean | addAll(Collection<? extends T> collection)
Implements java. Adds all of the elements in the specified collection to this collection (optional operation). |
| public Collection | castToCollection()
Implements org. This can be overridden in most implementations to just return this. |
| public void | clear()
Implements java. Removes all of the elements from this collection (optional operation). |
| public <V> ImmutableBag | 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> ImmutableBag | 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> ImmutableBag | 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 Stream | parallelStream()
Overrides default org. Returns a possibly parallel |
| 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<?> collection)
Implements java. Removes all of this collection's elements that are also contained in the specified collection (optional operation). |
| protected void | |
| public boolean | retainAll(Collection<?> collection)
Implements java. Retains only the elements in this collection that are contained in the specified collection (optional operation). |
| protected boolean | shortCircuit(T[] elements, int[] occurrences, ObjectIntPredicate<? super T> predicate, boolean expected, boolean onShortCircuit, boolean atEnd)
|
| public Spliterator | spliterator()
Overrides default java. Creates a |
| public Stream | stream()
Overrides default org. Returns a sequential |
| public <V> ImmutableObjectDoubleMap | 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> ImmutableObjectDoubleMap | 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> ImmutableObjectLongMap | 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> ImmutableObjectLongMap | sumByLong(Function<? super T, ? extends V> groupBy, LongFunction<? super T> function)
Implements org. Groups and sums the values using the two specified functions. |
| AbstractImmutableBagIterable | back to summary |
|---|---|
| public AbstractImmutableBagIterable() | |
| add | back to summary |
|---|---|
| public boolean add(T t) 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> collection) 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.
| |
| castToCollection | back to summary |
|---|---|
| public Collection Implements org. Doc from org. This can be overridden in most implementations to just return this.
| |
| clear | back to summary |
|---|---|
| public void clear() Implements java. Doc from java. Removes all of the elements from this collection (optional operation). The collection will be empty after this method returns.
| |
| countBy | back to summary |
|---|---|
| public <V> ImmutableBag 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> ImmutableBag 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> ImmutableBag 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.
| |
| parallelStream | back to summary |
|---|---|
| public Stream Overrides default org. Doc from java. Returns a possibly parallel This method should be overridden when the
| |
| 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<?> collection) 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.
| |
| removeAllFrom | back to summary |
|---|---|
| protected void removeAllFrom(Iterable<? extends T> elements, MutableCollection<T> result) | |
| retainAll | back to summary |
|---|---|
| public boolean retainAll(Collection<?> collection) 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.
| |
| shortCircuit | back to summary |
|---|---|
| protected boolean shortCircuit(T[] elements, int[] occurrences, ObjectIntPredicate<? super T> predicate, boolean expected, boolean onShortCircuit, boolean atEnd) | |
| spliterator | back to summary |
|---|---|
| public Spliterator Overrides default java. Doc from java. Creates a
| |
| stream | back to summary |
|---|---|
| public Stream Overrides default org. Doc from java. Returns a sequential This method should be overridden when the
| |
| sumByDouble | back to summary |
|---|---|
| public <V> ImmutableObjectDoubleMap Implements org. Doc from org. Groups and sums the values using the two specified functions.
| |
| sumByFloat | back to summary |
|---|---|
| public <V> ImmutableObjectDoubleMap Implements org. Doc from org. Groups and sums the values using the two specified functions.
| |
| sumByInt | back to summary |
|---|---|
| public <V> ImmutableObjectLongMap Implements org. Doc from org. Groups and sums the values using the two specified functions.
| |
| sumByLong | back to summary |
|---|---|
| public <V> ImmutableObjectLongMap Implements org. Doc from org. Groups and sums the values using the two specified functions.
| |