public abstract class AbstractMutableCollection<T> extends AbstractRichIterable<T> implements com.gs.collections.api.collection.MutableCollection<T>
| Constructor and Description |
|---|
AbstractMutableCollection() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T element) |
boolean |
addAll(java.util.Collection<? extends T> source) |
boolean |
addAllIterable(java.lang.Iterable<? extends T> iterable) |
<K,V> com.gs.collections.api.map.MutableMap<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.MutableMap<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.
|
<IV,P> IV |
injectIntoWith(IV injectValue,
com.gs.collections.api.block.function.Function3<? super IV,? super T,? super P,? extends IV> function,
P parameter) |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> source) |
boolean |
removeAllIterable(java.lang.Iterable<?> iterable) |
void |
removeIf(com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
Removes all elements in the collection that evaluate to true for the specified predicate.
|
<P> void |
removeIfWith(com.gs.collections.api.block.predicate.Predicate2<? super T,? super P> predicate,
P parameter)
Removes all elements in the collection that evaluate to true for the specified predicate2 and parameter.
|
boolean |
retainAll(java.util.Collection<?> source) |
boolean |
retainAllIterable(java.lang.Iterable<?> iterable) |
<P> com.gs.collections.api.tuple.Twin<com.gs.collections.api.list.MutableList<T>> |
selectAndRejectWith(com.gs.collections.api.block.predicate.Predicate2<? super T,? super P> predicate,
P parameter)
Filters a collection into two separate collections based on a predicate returned via a Pair.
|
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, forEachWith, forEachWithIndex, groupBy, groupByEach, injectInto, injectInto, injectInto, injectInto, injectInto, isEmpty, makeString, makeString, makeString, max, max, maxBy, min, min, minBy, noneSatisfy, noneSatisfyWith, notEmpty, reject, rejectWith, select, selectWith, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toList, toMap, toSet, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndexclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitasSynchronized, asUnmodifiable, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, flatCollect, groupBy, groupByEach, groupByUniqueKey, newEmpty, partition, partitionWith, reject, rejectWith, select, selectInstancesOf, selectWith, toImmutable, with, withAll, without, withoutAll, zip, zipWithIndexclear, contains, containsAll, equals, hashCode, isEmpty, iterator, size, toArray, toArrayallSatisfy, 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, getFirst, getLast, groupBy, groupByEach, injectInto, injectInto, injectInto, injectInto, injectInto, isEmpty, makeString, makeString, makeString, max, max, maxBy, min, min, minBy, noneSatisfy, noneSatisfyWith, notEmpty, reject, rejectWith, select, selectWith, size, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toList, toMap, toSet, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndexpublic <P> com.gs.collections.api.tuple.Twin<com.gs.collections.api.list.MutableList<T>> selectAndRejectWith(com.gs.collections.api.block.predicate.Predicate2<? super T,? super P> predicate, P parameter)
com.gs.collections.api.collection.MutableCollectione.g. return lastNames.selectAndRejectWith(PredicatesLite.lessThan(), "Mason");
selectAndRejectWith in interface com.gs.collections.api.collection.MutableCollection<T>public void removeIf(com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
com.gs.collections.api.collection.MutableCollectione.g. return lastNames.removeIf(Predicates.isNull());
removeIf in interface com.gs.collections.api.collection.MutableCollection<T>public <P> void removeIfWith(com.gs.collections.api.block.predicate.Predicate2<? super T,? super P> predicate, P parameter)
com.gs.collections.api.collection.MutableCollectione.g. return lastNames.removeIfWith(PredicatesLite.isNull(), null);
removeIfWith in interface com.gs.collections.api.collection.MutableCollection<T>public <IV,P> IV injectIntoWith(IV injectValue,
com.gs.collections.api.block.function.Function3<? super IV,? super T,? super P,? extends IV> function,
P parameter)
injectIntoWith in interface com.gs.collections.api.collection.MutableCollection<T>public boolean addAllIterable(java.lang.Iterable<? extends T> iterable)
addAllIterable in interface com.gs.collections.api.collection.MutableCollection<T>Collection.addAll(Collection)public boolean removeAllIterable(java.lang.Iterable<?> iterable)
removeAllIterable in interface com.gs.collections.api.collection.MutableCollection<T>Collection.removeAll(Collection)public boolean retainAllIterable(java.lang.Iterable<?> iterable)
retainAllIterable in interface com.gs.collections.api.collection.MutableCollection<T>Collection.retainAll(Collection)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.public <K,V> com.gs.collections.api.map.MutableMap<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.MutableMap<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 boolean remove(java.lang.Object o)
remove in interface java.util.Collection<T>public boolean addAll(java.util.Collection<? extends T> source)
addAll in interface java.util.Collection<T>public boolean removeAll(java.util.Collection<?> source)
removeAll in interface java.util.Collection<T>public boolean retainAll(java.util.Collection<?> source)
retainAll in interface java.util.Collection<T>