public abstract class AbstractImmutableCollection<T> extends AbstractRichIterable<T> implements ImmutableCollection<T>, Collection<T>
Constructor and Description |
---|
AbstractImmutableCollection() |
Modifier and Type | Method and 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.
|
RichIterable<RichIterable<T>> |
chunk(int size)
Partitions elements in fixed size chunks.
|
void |
clear() |
<V> ImmutableMap<V,T> |
groupByUniqueKey(Function<? super T,? extends V> function)
For each element of the iterable, the function is evaluated and he results of these evaluations are collected
into a new map, where the transformed value is the key.
|
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> collection) |
boolean |
retainAll(Collection<?> collection) |
allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, count, countWith, detect, detectIfNone, detectWith, detectWithIfNone, flatCollect, forEach, forEachWith, forEachWithIndex, groupBy, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, isEmpty, makeString, makeString, makeString, max, max, maxBy, min, min, minBy, noneSatisfy, noneSatisfyWith, notEmpty, reject, rejectWith, select, selectWith, sumByDouble, sumByFloat, sumByInt, sumByLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndex
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, flatCollect, groupBy, groupByEach, newWith, newWithAll, newWithout, newWithoutAll, partition, partitionWith, reject, rejectWith, select, selectInstancesOf, selectWith, tap, zip, zipWithIndex
allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, count, countWith, detect, detectIfNone, detectWith, detectWithIfNone, each, flatCollect, getFirst, getLast, groupBy, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, isEmpty, makeString, makeString, makeString, max, max, maxBy, min, min, minBy, noneSatisfy, noneSatisfyWith, notEmpty, reject, rejectWith, select, selectWith, size, sumByDouble, sumByFloat, sumByInt, sumByLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndex
forEach, forEachWith, forEachWithIndex
forEach, iterator, spliterator
contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, removeIf, size, spliterator, stream, toArray, toArray
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> ImmutableMap<V,T> groupByUniqueKey(Function<? super T,? extends V> function)
RichIterable
groupByUniqueKey
in interface ImmutableCollection<T>
groupByUniqueKey
in interface RichIterable<T>
RichIterable.groupBy(Function)
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 RichIterable<RichIterable<T>> chunk(int size)
RichIterable
chunk
in interface RichIterable<T>
size
- the number of elements per chunkRichIterable
containing RichIterable
s of size size
, except the last will be
truncated if the elements don't divide evenly.Copyright © 2004–2016. All rights reserved.