Iterable<T>
, Collection<T>
, MutableCollection<T>
, InternalIterable<T>
, RichIterable<T>
SynchronizedBag
, SynchronizedMutableCollection
, SynchronizedMutableList
, SynchronizedMutableSet
, SynchronizedSortedBag
, SynchronizedSortedSet
@ThreadSafe public abstract class AbstractSynchronizedMutableCollection<T> extends AbstractSynchronizedRichIterable<T> implements MutableCollection<T>
Modifier and Type | Method | Description |
---|---|---|
boolean |
add(T o) |
|
boolean |
addAll(Collection<? extends T> coll) |
|
boolean |
addAllIterable(Iterable<? extends T> iterable) |
|
<K,V> MutableMap<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> MutableMap<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.
|
void |
clear() |
|
<V> MutableMap<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.
|
<IV,P> IV |
injectIntoWith(IV injectValue,
Function3<? super IV,? super T,? super P,? extends IV> function,
P parameter) |
|
boolean |
remove(Object o) |
|
boolean |
removeAll(Collection<?> coll) |
|
boolean |
removeAllIterable(Iterable<?> iterable) |
|
boolean |
removeIf(Predicate<? super T> predicate) |
Removes all elements in the collection that evaluate to true for the specified predicate.
|
<P> boolean |
removeIfWith(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(Collection<?> coll) |
|
boolean |
retainAllIterable(Iterable<?> iterable) |
|
<P> Twin<MutableList<T>> |
selectAndRejectWith(Predicate2<? super T,? super P> predicate,
P parameter) |
Filters a collection into two separate collections based on a predicate returned via a Pair.
|
<V> MutableObjectDoubleMap<V> |
sumByDouble(Function<? super T,? extends V> groupBy,
DoubleFunction<? super T> function) |
Groups and sums the values using the two specified functions.
|
<V> MutableObjectDoubleMap<V> |
sumByFloat(Function<? super T,? extends V> groupBy,
FloatFunction<? super T> function) |
Groups and sums the values using the two specified functions.
|
<V> MutableObjectLongMap<V> |
sumByInt(Function<? super T,? extends V> groupBy,
IntFunction<? super T> function) |
Groups and sums the values using the two specified functions.
|
<V> MutableObjectLongMap<V> |
sumByLong(Function<? super T,? extends V> groupBy,
LongFunction<? super T> function) |
Groups and sums the values using the two specified functions.
|
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, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, equals, flatCollect, forEach, forEachWith, forEachWithIndex, getFirst, getLast, getOnly, groupBy, groupByEach, groupByUniqueKey, hashCode, injectInto, injectInto, injectInto, injectInto, injectInto, into, isEmpty, iterator, makeString, makeString, makeString, max, max, maxBy, maxByOptional, maxOptional, maxOptional, min, min, minBy, minByOptional, minOptional, minOptional, noneSatisfy, noneSatisfyWith, notEmpty, 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
contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, removeIf, size, spliterator, stream, toArray, toArray
forEach, forEachWith, forEachWithIndex
asSynchronized, asUnmodifiable, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, flatCollect, groupBy, groupByEach, newEmpty, partition, partitionWith, reject, rejectWith, select, selectInstancesOf, selectWith, tap, toImmutable, with, withAll, without, withoutAll, zip, zipWithIndex
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, 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, reduceInPlace, reduceInPlace, reject, rejectWith, select, selectWith, size, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, 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 boolean add(T o)
add
in interface Collection<T>
public boolean remove(Object o)
remove
in interface Collection<T>
public boolean addAll(Collection<? extends T> coll)
addAll
in interface Collection<T>
public boolean removeAll(Collection<?> coll)
removeAll
in interface Collection<T>
public boolean retainAll(Collection<?> coll)
retainAll
in interface Collection<T>
public void clear()
clear
in interface Collection<T>
public boolean removeIf(Predicate<? super T> predicate)
MutableCollection
e.g. return lastNames.removeIf(Predicates.isNull());
removeIf
in interface MutableCollection<T>
public <P> boolean removeIfWith(Predicate2<? super T,? super P> predicate, P parameter)
MutableCollection
return lastNames.removeIfWith(Predicates2.isNull(), null);
removeIfWith
in interface MutableCollection<T>
public boolean addAllIterable(Iterable<? extends T> iterable)
addAllIterable
in interface MutableCollection<T>
Collection.addAll(Collection)
public boolean removeAllIterable(Iterable<?> iterable)
removeAllIterable
in interface MutableCollection<T>
Collection.removeAll(Collection)
public boolean retainAllIterable(Iterable<?> iterable)
retainAllIterable
in interface MutableCollection<T>
Collection.retainAll(Collection)
public <P> Twin<MutableList<T>> selectAndRejectWith(Predicate2<? super T,? super P> predicate, P parameter)
MutableCollection
e.g. return lastNames.selectAndRejectWith(Predicates2.lessThan(), "Mason");
selectAndRejectWith
in interface MutableCollection<T>
public <IV,P> IV injectIntoWith(IV injectValue, Function3<? super IV,? super T,? super P,? extends IV> function, P parameter)
injectIntoWith
in interface MutableCollection<T>
public <V> MutableMap<V,T> groupByUniqueKey(Function<? super T,? extends V> function)
RichIterable
groupByUniqueKey
in interface MutableCollection<T>
groupByUniqueKey
in interface RichIterable<T>
groupByUniqueKey
in class AbstractSynchronizedRichIterable<T>
RichIterable.groupBy(Function)
public <K,V> MutableMap<K,V> aggregateInPlaceBy(Function<? super T,? extends K> groupBy, Function0<? extends V> zeroValueFactory, Procedure2<? super V,? super T> mutatingAggregator)
RichIterable
aggregateInPlaceBy
in interface MutableCollection<T>
aggregateInPlaceBy
in interface RichIterable<T>
public <K,V> MutableMap<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 MutableCollection<T>
aggregateBy
in interface RichIterable<T>
public <V> MutableObjectLongMap<V> sumByInt(Function<? super T,? extends V> groupBy, IntFunction<? super T> function)
RichIterable
sumByInt
in interface MutableCollection<T>
sumByInt
in interface RichIterable<T>
public <V> MutableObjectDoubleMap<V> sumByFloat(Function<? super T,? extends V> groupBy, FloatFunction<? super T> function)
RichIterable
sumByFloat
in interface MutableCollection<T>
sumByFloat
in interface RichIterable<T>
public <V> MutableObjectLongMap<V> sumByLong(Function<? super T,? extends V> groupBy, LongFunction<? super T> function)
RichIterable
sumByLong
in interface MutableCollection<T>
sumByLong
in interface RichIterable<T>
public <V> MutableObjectDoubleMap<V> sumByDouble(Function<? super T,? extends V> groupBy, DoubleFunction<? super T> function)
RichIterable
sumByDouble
in interface MutableCollection<T>
sumByDouble
in interface RichIterable<T>
Copyright © 2004–2017. All rights reserved.