public abstract class AbstractImmutableCollection<T> extends AbstractRichIterable<T> implements com.gs.collections.api.collection.ImmutableCollection<T>, java.util.Collection<T>
| Constructor and Description |
|---|
AbstractImmutableCollection() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T t) |
boolean |
addAll(java.util.Collection<? extends T> collection) |
<K,V> com.gs.collections.api.map.ImmutableMap<K,V> |
aggregateBy(com.gs.collections.api.block.function.Function<? super T,? extends K> groupBy,
com.gs.collections.api.block.function.Function0<? extends V> zeroValueFactory,
com.gs.collections.api.block.function.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> com.gs.collections.api.map.ImmutableMap<K,V> |
aggregateInPlaceBy(com.gs.collections.api.block.function.Function<? super T,? extends K> groupBy,
com.gs.collections.api.block.function.Function0<? extends V> zeroValueFactory,
com.gs.collections.api.block.procedure.Procedure2<? super V,? super T> mutatingAggregator)
Applies an aggregate procedure over the iterable grouping results into a Map based on the specific groupBy function.
|
com.gs.collections.api.RichIterable<com.gs.collections.api.RichIterable<T>> |
chunk(int size)
Partitions elements in fixed size chunks.
|
void |
clear() |
<V> com.gs.collections.api.map.ImmutableMap<V,T> |
groupByUniqueKey(com.gs.collections.api.block.function.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.
|
protected abstract com.gs.collections.api.collection.MutableCollection<T> |
newMutable(int size) |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> collection) |
protected void |
removeAllFrom(java.lang.Iterable<? extends T> elements,
com.gs.collections.api.collection.MutableCollection<T> result) |
boolean |
retainAll(java.util.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, zipWithIndexclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcollect, 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, zipWithIndexallSatisfy, 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, zipWithIndexprotected abstract com.gs.collections.api.collection.MutableCollection<T> newMutable(int size)
public <K,V> com.gs.collections.api.map.ImmutableMap<K,V> aggregateInPlaceBy(com.gs.collections.api.block.function.Function<? super T,? extends K> groupBy, com.gs.collections.api.block.function.Function0<? extends V> zeroValueFactory, com.gs.collections.api.block.procedure.Procedure2<? super V,? super T> mutatingAggregator)
com.gs.collections.api.RichIterablepublic <K,V> com.gs.collections.api.map.ImmutableMap<K,V> aggregateBy(com.gs.collections.api.block.function.Function<? super T,? extends K> groupBy, com.gs.collections.api.block.function.Function0<? extends V> zeroValueFactory, com.gs.collections.api.block.function.Function2<? super V,? super T,? extends V> nonMutatingAggregator)
com.gs.collections.api.RichIterablepublic <V> com.gs.collections.api.map.ImmutableMap<V,T> groupByUniqueKey(com.gs.collections.api.block.function.Function<? super T,? extends V> function)
com.gs.collections.api.RichIterablepublic boolean remove(java.lang.Object o)
remove in interface java.util.Collection<T>public boolean addAll(java.util.Collection<? extends T> collection)
addAll in interface java.util.Collection<T>public boolean removeAll(java.util.Collection<?> collection)
removeAll in interface java.util.Collection<T>public boolean retainAll(java.util.Collection<?> collection)
retainAll in interface java.util.Collection<T>public void clear()
clear in interface java.util.Collection<T>protected void removeAllFrom(java.lang.Iterable<? extends T> elements, com.gs.collections.api.collection.MutableCollection<T> result)
public com.gs.collections.api.RichIterable<com.gs.collections.api.RichIterable<T>> chunk(int size)
com.gs.collections.api.RichIterablechunk in interface com.gs.collections.api.RichIterable<T>size - the number of elements per chunkRichIterable containing RichIterables of size size, except the last will be
truncated if the elements don't divide evenly.