Iterable<T>
, Collection<T>
, Bag<T>
, ImmutableBagIterable<T>
, ImmutableCollection<T>
, InternalIterable<T>
, RichIterable<T>
AbstractImmutableBag
public abstract class AbstractImmutableBagIterable<T> extends AbstractBag<T> implements ImmutableBagIterable<T>
Constructor | Description |
---|---|
AbstractImmutableBagIterable() |
Modifier and Type | Method | Description |
---|---|---|
boolean |
add(T t) |
|
boolean |
addAll(Collection<? extends T> collection) |
|
<K,V> ImmutableMap<K,V> |
aggregateBy(Function<? super T,? extends K> groupBy,
Function0<? extends V> zeroValueFactory,
Function2<? super V,? super T,? extends V> nonMutatingAggregator) |
Applies an aggregate function over the iterable grouping results into a map based on the specific groupBy function.
|
<K,V> ImmutableMap<K,V> |
aggregateInPlaceBy(Function<? super T,? extends K> groupBy,
Function0<? extends V> zeroValueFactory,
Procedure2<? super V,? super T> mutatingAggregator) |
Applies an aggregate procedure over the iterable grouping results into a Map based on the specific groupBy function.
|
Collection<T> |
castToCollection() |
This can be overridden in most implementations to just return this.
|
void |
clear() |
|
<V> ImmutableBag<V> |
countBy(Function<? super T,? extends V> function) |
This method will count the number of occurrences of each value calculated by applying the
function to each element of the collection.
|
<V> ImmutableBag<V> |
countByEach(Function<? super T,? extends Iterable<V>> function) |
This method will count the number of occurrences of each value calculated by applying the
function to each element of the collection.
|
<V,P> ImmutableBag<V> |
countByWith(Function2<? super T,? super P,? extends V> function,
P parameter) |
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.
|
Stream<T> |
parallelStream() |
|
boolean |
remove(Object o) |
|
boolean |
removeAll(Collection<?> collection) |
|
boolean |
retainAll(Collection<?> collection) |
|
Spliterator<T> |
spliterator() |
|
Stream<T> |
stream() |
|
<V> ImmutableObjectDoubleMap<V> |
sumByDouble(Function<? super T,? extends V> groupBy,
DoubleFunction<? super T> function) |
Groups and sums the values using the two specified functions.
|
<V> ImmutableObjectDoubleMap<V> |
sumByFloat(Function<? super T,? extends V> groupBy,
FloatFunction<? super T> function) |
Groups and sums the values using the two specified functions.
|
<V> ImmutableObjectLongMap<V> |
sumByInt(Function<? super T,? extends V> groupBy,
IntFunction<? super T> function) |
Groups and sums the values using the two specified functions.
|
<V> ImmutableObjectLongMap<V> |
sumByLong(Function<? super T,? extends V> groupBy,
LongFunction<? super T> function) |
Groups and sums the values using the two specified functions.
|
collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, count, flatCollect, groupBy, groupByEach, injectInto, injectInto, injectInto, injectInto, injectInto, injectIntoWith, reject, rejectWith, select, selectWith, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toBag, toList, toSet, toSortedBag, toSortedBag, toSortedList, toSortedSet, toSortedSet, toStringOfItemToCount
allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, asLazy, contains, containsAll, containsAllArguments, containsAllIterable, countWith, detect, detectOptional, detectWith, detectWithIfNone, detectWithOptional, forEach, forEachWith, forEachWithIndex, groupByUniqueKey, into, isEmpty, max, max, maxBy, min, min, minBy, noneSatisfy, noneSatisfyWith, toArray, toArray, toBiMap, toMap, toSortedBagBy, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSetBy, toString, zip, zipWithIndex
bottomOccurrences, collectWithOccurrences, equals, forEachWithOccurrences, hashCode, occurrencesOf, reduceInPlace, reduceInPlace, sizeDistinct, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, toImmutable, topOccurrences, toStringOfItemToCount
contains, containsAll, equals, hashCode, isEmpty, iterator, removeIf, size, toArray, toArray
collectWithOccurrences, groupBy, groupByEach, partition, partitionWith, reject, rejectWith, select, selectByOccurrences, selectDuplicates, selectInstancesOf, selectUnique, selectWith, tap, toMapOfItemToCount, zipWithIndex
collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, flatCollect, flatCollectWith, groupByUniqueKey, newWith, newWithAll, newWithout, newWithoutAll, zip
forEach, forEachWith, forEachWithIndex
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, count, countBy, countByEach, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, flatCollect, flatCollectWith, forEach, getAny, getFirst, getLast, getOnly, groupBy, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, into, isEmpty, makeString, makeString, makeString, max, max, maxBy, maxByOptional, maxOptional, maxOptional, min, min, minBy, minByOptional, minOptional, minOptional, noneSatisfy, noneSatisfyWith, notEmpty, reduce, reject, rejectWith, select, selectWith, size, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toBiMap, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndex
public <K,V> ImmutableMap<K,V> aggregateInPlaceBy(Function<? super T,? extends K> groupBy, Function0<? extends V> zeroValueFactory, Procedure2<? super V,? super T> mutatingAggregator)
RichIterable
aggregateInPlaceBy
in interface ImmutableCollection<T>
aggregateInPlaceBy
in interface RichIterable<T>
public <K,V> ImmutableMap<K,V> aggregateBy(Function<? super T,? extends K> groupBy, Function0<? extends V> zeroValueFactory, Function2<? super V,? super T,? extends V> nonMutatingAggregator)
RichIterable
aggregateBy
in interface ImmutableCollection<T>
aggregateBy
in interface RichIterable<T>
public <V> ImmutableObjectLongMap<V> sumByInt(Function<? super T,? extends V> groupBy, IntFunction<? super T> function)
RichIterable
sumByInt
in interface ImmutableCollection<T>
sumByInt
in interface RichIterable<T>
public <V> ImmutableObjectDoubleMap<V> sumByFloat(Function<? super T,? extends V> groupBy, FloatFunction<? super T> function)
RichIterable
sumByFloat
in interface ImmutableCollection<T>
sumByFloat
in interface RichIterable<T>
public <V> ImmutableObjectLongMap<V> sumByLong(Function<? super T,? extends V> groupBy, LongFunction<? super T> function)
RichIterable
sumByLong
in interface ImmutableCollection<T>
sumByLong
in interface RichIterable<T>
public <V> ImmutableObjectDoubleMap<V> sumByDouble(Function<? super T,? extends V> groupBy, DoubleFunction<? super T> function)
RichIterable
sumByDouble
in interface ImmutableCollection<T>
sumByDouble
in interface RichIterable<T>
public boolean add(T t)
add
in interface Collection<T>
public boolean remove(Object o)
remove
in interface Collection<T>
public boolean addAll(Collection<? extends T> collection)
addAll
in interface Collection<T>
public boolean removeAll(Collection<?> collection)
removeAll
in interface Collection<T>
public boolean retainAll(Collection<?> collection)
retainAll
in interface Collection<T>
public void clear()
clear
in interface Collection<T>
public <V> ImmutableBag<V> countBy(Function<? super T,? extends V> function)
RichIterable
countBy
in interface ImmutableCollection<T>
countBy
in interface RichIterable<T>
public <V,P> ImmutableBag<V> countByWith(Function2<? super T,? super P,? extends V> function, P parameter)
RichIterable
countByWith
in interface ImmutableCollection<T>
countByWith
in interface RichIterable<T>
public <V> ImmutableBag<V> countByEach(Function<? super T,? extends Iterable<V>> function)
RichIterable
countByEach
in interface ImmutableCollection<T>
countByEach
in interface RichIterable<T>
countByEach
in class AbstractRichIterable<T>
public Stream<T> stream()
stream
in interface Collection<T>
stream
in interface ImmutableCollection<T>
public Stream<T> parallelStream()
parallelStream
in interface Collection<T>
parallelStream
in interface ImmutableCollection<T>
public Spliterator<T> spliterator()
spliterator
in interface Collection<T>
spliterator
in interface ImmutableCollection<T>
spliterator
in interface Iterable<T>
public Collection<T> castToCollection()
ImmutableCollection
castToCollection
in interface ImmutableCollection<T>
Copyright © 2004–2019. All rights reserved.