Class AbstractSynchronizedMutableCollection<T>
- java.lang.Object
-
- org.eclipse.collections.impl.collection.AbstractSynchronizedRichIterable<T>
-
- org.eclipse.collections.impl.collection.mutable.AbstractSynchronizedMutableCollection<T>
-
- All Implemented Interfaces:
Iterable<T>
,Collection<T>
,MutableCollection<T>
,InternalIterable<T>
,RichIterable<T>
- Direct Known Subclasses:
SynchronizedBag
,SynchronizedMutableCollection
,SynchronizedMutableList
,SynchronizedMutableSet
,SynchronizedSortedBag
,SynchronizedSortedSet
public abstract class AbstractSynchronizedMutableCollection<T> extends AbstractSynchronizedRichIterable<T> implements MutableCollection<T>
-
-
Method Summary
All Methods Instance Methods Concrete Methods 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)
<K,V>
MutableMap<K,V>aggregateInPlaceBy(Function<? super T,? extends K> groupBy, Function0<? extends V> zeroValueFactory, Procedure2<? super V,? super T> mutatingAggregator)
void
clear()
<V> MutableCollection<V>
collect(Function<? super T,? extends V> function)
MutableBooleanCollection
collectBoolean(BooleanFunction<? super T> booleanFunction)
MutableByteCollection
collectByte(ByteFunction<? super T> byteFunction)
MutableCharCollection
collectChar(CharFunction<? super T> charFunction)
MutableDoubleCollection
collectDouble(DoubleFunction<? super T> doubleFunction)
MutableFloatCollection
collectFloat(FloatFunction<? super T> floatFunction)
<V> MutableCollection<V>
collectIf(Predicate<? super T> predicate, Function<? super T,? extends V> function)
MutableIntCollection
collectInt(IntFunction<? super T> intFunction)
MutableLongCollection
collectLong(LongFunction<? super T> longFunction)
MutableShortCollection
collectShort(ShortFunction<? super T> shortFunction)
<P,V>
MutableCollection<V>collectWith(Function2<? super T,? super P,? extends V> function, P parameter)
<V> MutableBag<V>
countBy(Function<? super T,? extends V> function)
<V> MutableBag<V>
countByEach(Function<? super T,? extends Iterable<V>> function)
<V,P>
MutableBag<V>countByWith(Function2<? super T,? super P,? extends V> function, P parameter)
<V> MutableCollection<V>
flatCollect(Function<? super T,? extends Iterable<V>> function)
<V> MutableMultimap<V,T>
groupBy(Function<? super T,? extends V> function)
<V> MutableMultimap<V,T>
groupByEach(Function<? super T,? extends Iterable<V>> function)
<V> MutableMap<V,T>
groupByUniqueKey(Function<? super T,? extends V> function)
<IV,P>
IVinjectIntoWith(IV injectValue, Function3<? super IV,? super T,? super P,? extends IV> function, P parameter)
PartitionMutableCollection<T>
partition(Predicate<? super T> predicate)
<P> PartitionMutableCollection<T>
partitionWith(Predicate2<? super T,? super P> predicate, P parameter)
MutableCollection<T>
reject(Predicate<? super T> predicate)
<P> MutableCollection<T>
rejectWith(Predicate2<? super T,? super P> predicate, P parameter)
boolean
remove(Object o)
boolean
removeAll(Collection<?> coll)
boolean
removeAllIterable(Iterable<?> iterable)
boolean
removeIf(Predicate<? super T> predicate)
<P> boolean
removeIfWith(Predicate2<? super T,? super P> predicate, P parameter)
boolean
retainAll(Collection<?> coll)
boolean
retainAllIterable(Iterable<?> iterable)
MutableCollection<T>
select(Predicate<? super T> predicate)
<P> Twin<MutableList<T>>
selectAndRejectWith(Predicate2<? super T,? super P> predicate, P parameter)
<S> MutableCollection<S>
selectInstancesOf(Class<S> clazz)
<P> MutableCollection<T>
selectWith(Predicate2<? super T,? super P> predicate, P parameter)
<V> MutableObjectDoubleMap<V>
sumByDouble(Function<? super T,? extends V> groupBy, DoubleFunction<? super T> function)
<V> MutableObjectDoubleMap<V>
sumByFloat(Function<? super T,? extends V> groupBy, FloatFunction<? super T> function)
<V> MutableObjectLongMap<V>
sumByInt(Function<? super T,? extends V> groupBy, IntFunction<? super T> function)
<V> MutableObjectLongMap<V>
sumByLong(Function<? super T,? extends V> groupBy, LongFunction<? super T> function)
MutableCollection<T>
tap(Procedure<? super T> procedure)
<S> MutableCollection<Pair<T,S>>
zip(Iterable<S> that)
MutableCollection<Pair<T,Integer>>
zipWithIndex()
-
Methods inherited from class org.eclipse.collections.impl.collection.AbstractSynchronizedRichIterable
allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, containsAny, containsAnyIterable, containsNone, containsNoneIterable, count, countBy, countByEach, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, equals, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, forEachWith, forEachWithIndex, getFirst, getLast, getOnly, groupBy, groupByEach, groupByUniqueKey, hashCode, injectInto, injectInto, injectInto, injectInto, injectInto, into, isEmpty, iterator, makeString, 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, toBiMap, toImmutableBag, toImmutableList, toImmutableSet, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toString, zip, zipWithIndex
-
Methods inherited from interface java.util.Collection
contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, removeIf, size, spliterator, stream, toArray, toArray, toArray
-
Methods inherited from interface org.eclipse.collections.api.InternalIterable
forEach, forEachWith, forEachWithIndex
-
Methods inherited from interface org.eclipse.collections.api.collection.MutableCollection
asSynchronized, asUnmodifiable, flatCollectWith, newEmpty, toImmutable, with, withAll, without, withoutAll
-
Methods inherited from interface org.eclipse.collections.api.RichIterable
aggregateBy, allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, containsAny, containsAnyIterable, containsBy, containsNone, containsNoneIterable, count, countBy, countByEach, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, flatCollectWith, forEach, getAny, getFirst, getLast, getOnly, groupBy, groupByAndCollect, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, into, isEmpty, makeString, 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, toBiMap, toImmutableBag, toImmutableBiMap, toImmutableList, toImmutableMap, toImmutableSet, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedListBy, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndex
-
-
-
-
Method Detail
-
select
public MutableCollection<T> select(Predicate<? super T> predicate)
- Specified by:
select
in interfaceMutableCollection<T>
- Specified by:
select
in interfaceRichIterable<T>
- Overrides:
select
in classAbstractSynchronizedRichIterable<T>
- Since:
- 9.0
-
selectInstancesOf
public <S> MutableCollection<S> selectInstancesOf(Class<S> clazz)
- Specified by:
selectInstancesOf
in interfaceMutableCollection<T>
- Specified by:
selectInstancesOf
in interfaceRichIterable<T>
- Overrides:
selectInstancesOf
in classAbstractSynchronizedRichIterable<T>
- Since:
- 9.0
-
reject
public MutableCollection<T> reject(Predicate<? super T> predicate)
- Specified by:
reject
in interfaceMutableCollection<T>
- Specified by:
reject
in interfaceRichIterable<T>
- Overrides:
reject
in classAbstractSynchronizedRichIterable<T>
- Since:
- 9.0
-
flatCollect
public <V> MutableCollection<V> flatCollect(Function<? super T,? extends Iterable<V>> function)
- Specified by:
flatCollect
in interfaceMutableCollection<T>
- Specified by:
flatCollect
in interfaceRichIterable<T>
- Overrides:
flatCollect
in classAbstractSynchronizedRichIterable<T>
- Since:
- 9.0
-
collect
public <V> MutableCollection<V> collect(Function<? super T,? extends V> function)
- Specified by:
collect
in interfaceMutableCollection<T>
- Specified by:
collect
in interfaceRichIterable<T>
- Overrides:
collect
in classAbstractSynchronizedRichIterable<T>
- Since:
- 9.0
-
collectWith
public <P,V> MutableCollection<V> collectWith(Function2<? super T,? super P,? extends V> function, P parameter)
- Specified by:
collectWith
in interfaceMutableCollection<T>
- Specified by:
collectWith
in interfaceRichIterable<T>
- Overrides:
collectWith
in classAbstractSynchronizedRichIterable<T>
- Since:
- 9.0
-
collectBoolean
public MutableBooleanCollection collectBoolean(BooleanFunction<? super T> booleanFunction)
- Specified by:
collectBoolean
in interfaceMutableCollection<T>
- Specified by:
collectBoolean
in interfaceRichIterable<T>
- Overrides:
collectBoolean
in classAbstractSynchronizedRichIterable<T>
- Since:
- 9.0
-
collectByte
public MutableByteCollection collectByte(ByteFunction<? super T> byteFunction)
- Specified by:
collectByte
in interfaceMutableCollection<T>
- Specified by:
collectByte
in interfaceRichIterable<T>
- Overrides:
collectByte
in classAbstractSynchronizedRichIterable<T>
- Since:
- 9.0
-
collectChar
public MutableCharCollection collectChar(CharFunction<? super T> charFunction)
- Specified by:
collectChar
in interfaceMutableCollection<T>
- Specified by:
collectChar
in interfaceRichIterable<T>
- Overrides:
collectChar
in classAbstractSynchronizedRichIterable<T>
- Since:
- 9.0
-
collectDouble
public MutableDoubleCollection collectDouble(DoubleFunction<? super T> doubleFunction)
- Specified by:
collectDouble
in interfaceMutableCollection<T>
- Specified by:
collectDouble
in interfaceRichIterable<T>
- Overrides:
collectDouble
in classAbstractSynchronizedRichIterable<T>
- Since:
- 9.0
-
collectFloat
public MutableFloatCollection collectFloat(FloatFunction<? super T> floatFunction)
- Specified by:
collectFloat
in interfaceMutableCollection<T>
- Specified by:
collectFloat
in interfaceRichIterable<T>
- Overrides:
collectFloat
in classAbstractSynchronizedRichIterable<T>
- Since:
- 9.0
-
collectInt
public MutableIntCollection collectInt(IntFunction<? super T> intFunction)
- Specified by:
collectInt
in interfaceMutableCollection<T>
- Specified by:
collectInt
in interfaceRichIterable<T>
- Overrides:
collectInt
in classAbstractSynchronizedRichIterable<T>
- Since:
- 9.0
-
collectLong
public MutableLongCollection collectLong(LongFunction<? super T> longFunction)
- Specified by:
collectLong
in interfaceMutableCollection<T>
- Specified by:
collectLong
in interfaceRichIterable<T>
- Overrides:
collectLong
in classAbstractSynchronizedRichIterable<T>
- Since:
- 9.0
-
collectShort
public MutableShortCollection collectShort(ShortFunction<? super T> shortFunction)
- Specified by:
collectShort
in interfaceMutableCollection<T>
- Specified by:
collectShort
in interfaceRichIterable<T>
- Overrides:
collectShort
in classAbstractSynchronizedRichIterable<T>
- Since:
- 9.0
-
selectWith
public <P> MutableCollection<T> selectWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
selectWith
in interfaceMutableCollection<T>
- Specified by:
selectWith
in interfaceRichIterable<T>
- Overrides:
selectWith
in classAbstractSynchronizedRichIterable<T>
- Since:
- 9.0
-
rejectWith
public <P> MutableCollection<T> rejectWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
rejectWith
in interfaceMutableCollection<T>
- Specified by:
rejectWith
in interfaceRichIterable<T>
- Overrides:
rejectWith
in classAbstractSynchronizedRichIterable<T>
- Since:
- 9.0
-
collectIf
public <V> MutableCollection<V> collectIf(Predicate<? super T> predicate, Function<? super T,? extends V> function)
- Specified by:
collectIf
in interfaceMutableCollection<T>
- Specified by:
collectIf
in interfaceRichIterable<T>
- Overrides:
collectIf
in classAbstractSynchronizedRichIterable<T>
- Since:
- 9.0
-
tap
public MutableCollection<T> tap(Procedure<? super T> procedure)
- Specified by:
tap
in interfaceMutableCollection<T>
- Specified by:
tap
in interfaceRichIterable<T>
- Overrides:
tap
in classAbstractSynchronizedRichIterable<T>
- Since:
- 9.0
-
zip
public <S> MutableCollection<Pair<T,S>> zip(Iterable<S> that)
- Specified by:
zip
in interfaceMutableCollection<T>
- Specified by:
zip
in interfaceRichIterable<T>
- Overrides:
zip
in classAbstractSynchronizedRichIterable<T>
- Since:
- 9.0
-
zipWithIndex
public MutableCollection<Pair<T,Integer>> zipWithIndex()
- Specified by:
zipWithIndex
in interfaceMutableCollection<T>
- Specified by:
zipWithIndex
in interfaceRichIterable<T>
- Overrides:
zipWithIndex
in classAbstractSynchronizedRichIterable<T>
- Since:
- 9.0
-
groupBy
public <V> MutableMultimap<V,T> groupBy(Function<? super T,? extends V> function)
- Specified by:
groupBy
in interfaceMutableCollection<T>
- Specified by:
groupBy
in interfaceRichIterable<T>
- Overrides:
groupBy
in classAbstractSynchronizedRichIterable<T>
- Since:
- 9.0
-
groupByEach
public <V> MutableMultimap<V,T> groupByEach(Function<? super T,? extends Iterable<V>> function)
- Specified by:
groupByEach
in interfaceMutableCollection<T>
- Specified by:
groupByEach
in interfaceRichIterable<T>
- Overrides:
groupByEach
in classAbstractSynchronizedRichIterable<T>
- Since:
- 9.0
-
countBy
public <V> MutableBag<V> countBy(Function<? super T,? extends V> function)
- Specified by:
countBy
in interfaceMutableCollection<T>
- Specified by:
countBy
in interfaceRichIterable<T>
- Overrides:
countBy
in classAbstractSynchronizedRichIterable<T>
- Since:
- 9.0
-
countByWith
public <V,P> MutableBag<V> countByWith(Function2<? super T,? super P,? extends V> function, P parameter)
- Specified by:
countByWith
in interfaceMutableCollection<T>
- Specified by:
countByWith
in interfaceRichIterable<T>
- Overrides:
countByWith
in classAbstractSynchronizedRichIterable<T>
- Since:
- 9.0
-
countByEach
public <V> MutableBag<V> countByEach(Function<? super T,? extends Iterable<V>> function)
- Specified by:
countByEach
in interfaceMutableCollection<T>
- Specified by:
countByEach
in interfaceRichIterable<T>
- Overrides:
countByEach
in classAbstractSynchronizedRichIterable<T>
- Since:
- 10.0.0
-
partition
public PartitionMutableCollection<T> partition(Predicate<? super T> predicate)
- Specified by:
partition
in interfaceMutableCollection<T>
- Specified by:
partition
in interfaceRichIterable<T>
- Overrides:
partition
in classAbstractSynchronizedRichIterable<T>
- Since:
- 9.0
-
partitionWith
public <P> PartitionMutableCollection<T> partitionWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
partitionWith
in interfaceMutableCollection<T>
- Specified by:
partitionWith
in interfaceRichIterable<T>
- Overrides:
partitionWith
in classAbstractSynchronizedRichIterable<T>
- Since:
- 9.0
-
add
public boolean add(T o)
- Specified by:
add
in interfaceCollection<T>
-
remove
public boolean remove(Object o)
- Specified by:
remove
in interfaceCollection<T>
-
addAll
public boolean addAll(Collection<? extends T> coll)
- Specified by:
addAll
in interfaceCollection<T>
-
removeAll
public boolean removeAll(Collection<?> coll)
- Specified by:
removeAll
in interfaceCollection<T>
-
retainAll
public boolean retainAll(Collection<?> coll)
- Specified by:
retainAll
in interfaceCollection<T>
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<T>
-
removeIf
public boolean removeIf(Predicate<? super T> predicate)
- Specified by:
removeIf
in interfaceMutableCollection<T>
-
removeIfWith
public <P> boolean removeIfWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
removeIfWith
in interfaceMutableCollection<T>
-
addAllIterable
public boolean addAllIterable(Iterable<? extends T> iterable)
- Specified by:
addAllIterable
in interfaceMutableCollection<T>
-
removeAllIterable
public boolean removeAllIterable(Iterable<?> iterable)
- Specified by:
removeAllIterable
in interfaceMutableCollection<T>
-
retainAllIterable
public boolean retainAllIterable(Iterable<?> iterable)
- Specified by:
retainAllIterable
in interfaceMutableCollection<T>
-
selectAndRejectWith
public <P> Twin<MutableList<T>> selectAndRejectWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
selectAndRejectWith
in interfaceMutableCollection<T>
-
injectIntoWith
public <IV,P> IV injectIntoWith(IV injectValue, Function3<? super IV,? super T,? super P,? extends IV> function, P parameter)
- Specified by:
injectIntoWith
in interfaceMutableCollection<T>
-
groupByUniqueKey
public <V> MutableMap<V,T> groupByUniqueKey(Function<? super T,? extends V> function)
- Specified by:
groupByUniqueKey
in interfaceMutableCollection<T>
- Specified by:
groupByUniqueKey
in interfaceRichIterable<T>
- Overrides:
groupByUniqueKey
in classAbstractSynchronizedRichIterable<T>
-
aggregateInPlaceBy
public <K,V> MutableMap<K,V> aggregateInPlaceBy(Function<? super T,? extends K> groupBy, Function0<? extends V> zeroValueFactory, Procedure2<? super V,? super T> mutatingAggregator)
- Specified by:
aggregateInPlaceBy
in interfaceMutableCollection<T>
- Specified by:
aggregateInPlaceBy
in interfaceRichIterable<T>
- Overrides:
aggregateInPlaceBy
in classAbstractSynchronizedRichIterable<T>
-
aggregateBy
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)
- Specified by:
aggregateBy
in interfaceMutableCollection<T>
- Specified by:
aggregateBy
in interfaceRichIterable<T>
- Overrides:
aggregateBy
in classAbstractSynchronizedRichIterable<T>
-
sumByInt
public <V> MutableObjectLongMap<V> sumByInt(Function<? super T,? extends V> groupBy, IntFunction<? super T> function)
- Specified by:
sumByInt
in interfaceMutableCollection<T>
- Specified by:
sumByInt
in interfaceRichIterable<T>
- Overrides:
sumByInt
in classAbstractSynchronizedRichIterable<T>
-
sumByFloat
public <V> MutableObjectDoubleMap<V> sumByFloat(Function<? super T,? extends V> groupBy, FloatFunction<? super T> function)
- Specified by:
sumByFloat
in interfaceMutableCollection<T>
- Specified by:
sumByFloat
in interfaceRichIterable<T>
- Overrides:
sumByFloat
in classAbstractSynchronizedRichIterable<T>
-
sumByLong
public <V> MutableObjectLongMap<V> sumByLong(Function<? super T,? extends V> groupBy, LongFunction<? super T> function)
- Specified by:
sumByLong
in interfaceMutableCollection<T>
- Specified by:
sumByLong
in interfaceRichIterable<T>
- Overrides:
sumByLong
in classAbstractSynchronizedRichIterable<T>
-
sumByDouble
public <V> MutableObjectDoubleMap<V> sumByDouble(Function<? super T,? extends V> groupBy, DoubleFunction<? super T> function)
- Specified by:
sumByDouble
in interfaceMutableCollection<T>
- Specified by:
sumByDouble
in interfaceRichIterable<T>
- Overrides:
sumByDouble
in classAbstractSynchronizedRichIterable<T>
-
-