java.lang.Iterable<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(java.util.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.
|
java.util.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,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.
|
java.util.stream.Stream<T> |
parallelStream() |
|
boolean |
remove(java.lang.Object o) |
|
boolean |
removeAll(java.util.Collection<?> collection) |
|
boolean |
retainAll(java.util.Collection<?> collection) |
|
java.util.Spliterator<T> |
spliterator() |
|
java.util.stream.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, toMap, toSortedBagBy, toSortedListBy, toSortedMap, toSortedMap, 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
groupBy, groupByEach, partition, partitionWith, reject, rejectWith, select, selectByOccurrences, selectInstancesOf, selectWith, tap, toMapOfItemToCount, zipWithIndex
collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, flatCollect, groupByUniqueKey, newWith, newWithAll, newWithout, newWithoutAll, zip
forEach, 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, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, flatCollect, 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, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, 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)
public boolean remove(java.lang.Object o)
public boolean addAll(java.util.Collection<? extends T> collection)
public boolean removeAll(java.util.Collection<?> collection)
public boolean retainAll(java.util.Collection<?> collection)
public void clear()
public <V> ImmutableBag<V> countBy(Function<? super T,? extends V> function)
RichIterable
countBy
in interface ImmutableCollection<T>
countBy
in interface RichIterable<T>
countBy
in class AbstractRichIterable<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>
countByWith
in class AbstractRichIterable<T>
public java.util.stream.Stream<T> stream()
stream
in interface ImmutableCollection<T>
public java.util.stream.Stream<T> parallelStream()
parallelStream
in interface ImmutableCollection<T>
public java.util.Spliterator<T> spliterator()
spliterator
in interface ImmutableCollection<T>
spliterator
in interface java.lang.Iterable<T>
public java.util.Collection<T> castToCollection()
ImmutableCollection
castToCollection
in interface ImmutableCollection<T>
Copyright © 2004–2018. All rights reserved.