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 booleanadd(T o)booleanaddAll(Collection<? extends T> coll)booleanaddAllIterable(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)voidclear()<V> MutableCollection<V>collect(Function<? super T,? extends V> function)MutableBooleanCollectioncollectBoolean(BooleanFunction<? super T> booleanFunction)MutableByteCollectioncollectByte(ByteFunction<? super T> byteFunction)MutableCharCollectioncollectChar(CharFunction<? super T> charFunction)MutableDoubleCollectioncollectDouble(DoubleFunction<? super T> doubleFunction)MutableFloatCollectioncollectFloat(FloatFunction<? super T> floatFunction)<V> MutableCollection<V>collectIf(Predicate<? super T> predicate, Function<? super T,? extends V> function)MutableIntCollectioncollectInt(IntFunction<? super T> intFunction)MutableLongCollectioncollectLong(LongFunction<? super T> longFunction)MutableShortCollectioncollectShort(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)booleanremove(Object o)booleanremoveAll(Collection<?> coll)booleanremoveAllIterable(Iterable<?> iterable)booleanremoveIf(Predicate<? super T> predicate)<P> booleanremoveIfWith(Predicate2<? super T,? super P> predicate, P parameter)booleanretainAll(Collection<?> coll)booleanretainAllIterable(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:
selectin interfaceMutableCollection<T>- Specified by:
selectin interfaceRichIterable<T>- Overrides:
selectin classAbstractSynchronizedRichIterable<T>- Since:
- 9.0
-
selectInstancesOf
public <S> MutableCollection<S> selectInstancesOf(Class<S> clazz)
- Specified by:
selectInstancesOfin interfaceMutableCollection<T>- Specified by:
selectInstancesOfin interfaceRichIterable<T>- Overrides:
selectInstancesOfin classAbstractSynchronizedRichIterable<T>- Since:
- 9.0
-
reject
public MutableCollection<T> reject(Predicate<? super T> predicate)
- Specified by:
rejectin interfaceMutableCollection<T>- Specified by:
rejectin interfaceRichIterable<T>- Overrides:
rejectin classAbstractSynchronizedRichIterable<T>- Since:
- 9.0
-
flatCollect
public <V> MutableCollection<V> flatCollect(Function<? super T,? extends Iterable<V>> function)
- Specified by:
flatCollectin interfaceMutableCollection<T>- Specified by:
flatCollectin interfaceRichIterable<T>- Overrides:
flatCollectin classAbstractSynchronizedRichIterable<T>- Since:
- 9.0
-
collect
public <V> MutableCollection<V> collect(Function<? super T,? extends V> function)
- Specified by:
collectin interfaceMutableCollection<T>- Specified by:
collectin interfaceRichIterable<T>- Overrides:
collectin classAbstractSynchronizedRichIterable<T>- Since:
- 9.0
-
collectWith
public <P,V> MutableCollection<V> collectWith(Function2<? super T,? super P,? extends V> function, P parameter)
- Specified by:
collectWithin interfaceMutableCollection<T>- Specified by:
collectWithin interfaceRichIterable<T>- Overrides:
collectWithin classAbstractSynchronizedRichIterable<T>- Since:
- 9.0
-
collectBoolean
public MutableBooleanCollection collectBoolean(BooleanFunction<? super T> booleanFunction)
- Specified by:
collectBooleanin interfaceMutableCollection<T>- Specified by:
collectBooleanin interfaceRichIterable<T>- Overrides:
collectBooleanin classAbstractSynchronizedRichIterable<T>- Since:
- 9.0
-
collectByte
public MutableByteCollection collectByte(ByteFunction<? super T> byteFunction)
- Specified by:
collectBytein interfaceMutableCollection<T>- Specified by:
collectBytein interfaceRichIterable<T>- Overrides:
collectBytein classAbstractSynchronizedRichIterable<T>- Since:
- 9.0
-
collectChar
public MutableCharCollection collectChar(CharFunction<? super T> charFunction)
- Specified by:
collectCharin interfaceMutableCollection<T>- Specified by:
collectCharin interfaceRichIterable<T>- Overrides:
collectCharin classAbstractSynchronizedRichIterable<T>- Since:
- 9.0
-
collectDouble
public MutableDoubleCollection collectDouble(DoubleFunction<? super T> doubleFunction)
- Specified by:
collectDoublein interfaceMutableCollection<T>- Specified by:
collectDoublein interfaceRichIterable<T>- Overrides:
collectDoublein classAbstractSynchronizedRichIterable<T>- Since:
- 9.0
-
collectFloat
public MutableFloatCollection collectFloat(FloatFunction<? super T> floatFunction)
- Specified by:
collectFloatin interfaceMutableCollection<T>- Specified by:
collectFloatin interfaceRichIterable<T>- Overrides:
collectFloatin classAbstractSynchronizedRichIterable<T>- Since:
- 9.0
-
collectInt
public MutableIntCollection collectInt(IntFunction<? super T> intFunction)
- Specified by:
collectIntin interfaceMutableCollection<T>- Specified by:
collectIntin interfaceRichIterable<T>- Overrides:
collectIntin classAbstractSynchronizedRichIterable<T>- Since:
- 9.0
-
collectLong
public MutableLongCollection collectLong(LongFunction<? super T> longFunction)
- Specified by:
collectLongin interfaceMutableCollection<T>- Specified by:
collectLongin interfaceRichIterable<T>- Overrides:
collectLongin classAbstractSynchronizedRichIterable<T>- Since:
- 9.0
-
collectShort
public MutableShortCollection collectShort(ShortFunction<? super T> shortFunction)
- Specified by:
collectShortin interfaceMutableCollection<T>- Specified by:
collectShortin interfaceRichIterable<T>- Overrides:
collectShortin classAbstractSynchronizedRichIterable<T>- Since:
- 9.0
-
selectWith
public <P> MutableCollection<T> selectWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
selectWithin interfaceMutableCollection<T>- Specified by:
selectWithin interfaceRichIterable<T>- Overrides:
selectWithin classAbstractSynchronizedRichIterable<T>- Since:
- 9.0
-
rejectWith
public <P> MutableCollection<T> rejectWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
rejectWithin interfaceMutableCollection<T>- Specified by:
rejectWithin interfaceRichIterable<T>- Overrides:
rejectWithin classAbstractSynchronizedRichIterable<T>- Since:
- 9.0
-
collectIf
public <V> MutableCollection<V> collectIf(Predicate<? super T> predicate, Function<? super T,? extends V> function)
- Specified by:
collectIfin interfaceMutableCollection<T>- Specified by:
collectIfin interfaceRichIterable<T>- Overrides:
collectIfin classAbstractSynchronizedRichIterable<T>- Since:
- 9.0
-
tap
public MutableCollection<T> tap(Procedure<? super T> procedure)
- Specified by:
tapin interfaceMutableCollection<T>- Specified by:
tapin interfaceRichIterable<T>- Overrides:
tapin classAbstractSynchronizedRichIterable<T>- Since:
- 9.0
-
zip
public <S> MutableCollection<Pair<T,S>> zip(Iterable<S> that)
- Specified by:
zipin interfaceMutableCollection<T>- Specified by:
zipin interfaceRichIterable<T>- Overrides:
zipin classAbstractSynchronizedRichIterable<T>- Since:
- 9.0
-
zipWithIndex
public MutableCollection<Pair<T,Integer>> zipWithIndex()
- Specified by:
zipWithIndexin interfaceMutableCollection<T>- Specified by:
zipWithIndexin interfaceRichIterable<T>- Overrides:
zipWithIndexin classAbstractSynchronizedRichIterable<T>- Since:
- 9.0
-
groupBy
public <V> MutableMultimap<V,T> groupBy(Function<? super T,? extends V> function)
- Specified by:
groupByin interfaceMutableCollection<T>- Specified by:
groupByin interfaceRichIterable<T>- Overrides:
groupByin classAbstractSynchronizedRichIterable<T>- Since:
- 9.0
-
groupByEach
public <V> MutableMultimap<V,T> groupByEach(Function<? super T,? extends Iterable<V>> function)
- Specified by:
groupByEachin interfaceMutableCollection<T>- Specified by:
groupByEachin interfaceRichIterable<T>- Overrides:
groupByEachin classAbstractSynchronizedRichIterable<T>- Since:
- 9.0
-
countBy
public <V> MutableBag<V> countBy(Function<? super T,? extends V> function)
- Specified by:
countByin interfaceMutableCollection<T>- Specified by:
countByin interfaceRichIterable<T>- Overrides:
countByin classAbstractSynchronizedRichIterable<T>- Since:
- 9.0
-
countByWith
public <V,P> MutableBag<V> countByWith(Function2<? super T,? super P,? extends V> function, P parameter)
- Specified by:
countByWithin interfaceMutableCollection<T>- Specified by:
countByWithin interfaceRichIterable<T>- Overrides:
countByWithin classAbstractSynchronizedRichIterable<T>- Since:
- 9.0
-
countByEach
public <V> MutableBag<V> countByEach(Function<? super T,? extends Iterable<V>> function)
- Specified by:
countByEachin interfaceMutableCollection<T>- Specified by:
countByEachin interfaceRichIterable<T>- Overrides:
countByEachin classAbstractSynchronizedRichIterable<T>- Since:
- 10.0.0
-
partition
public PartitionMutableCollection<T> partition(Predicate<? super T> predicate)
- Specified by:
partitionin interfaceMutableCollection<T>- Specified by:
partitionin interfaceRichIterable<T>- Overrides:
partitionin classAbstractSynchronizedRichIterable<T>- Since:
- 9.0
-
partitionWith
public <P> PartitionMutableCollection<T> partitionWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
partitionWithin interfaceMutableCollection<T>- Specified by:
partitionWithin interfaceRichIterable<T>- Overrides:
partitionWithin classAbstractSynchronizedRichIterable<T>- Since:
- 9.0
-
add
public boolean add(T o)
- Specified by:
addin interfaceCollection<T>
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<T>
-
addAll
public boolean addAll(Collection<? extends T> coll)
- Specified by:
addAllin interfaceCollection<T>
-
removeAll
public boolean removeAll(Collection<?> coll)
- Specified by:
removeAllin interfaceCollection<T>
-
retainAll
public boolean retainAll(Collection<?> coll)
- Specified by:
retainAllin interfaceCollection<T>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<T>
-
removeIf
public boolean removeIf(Predicate<? super T> predicate)
- Specified by:
removeIfin interfaceMutableCollection<T>
-
removeIfWith
public <P> boolean removeIfWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
removeIfWithin interfaceMutableCollection<T>
-
addAllIterable
public boolean addAllIterable(Iterable<? extends T> iterable)
- Specified by:
addAllIterablein interfaceMutableCollection<T>
-
removeAllIterable
public boolean removeAllIterable(Iterable<?> iterable)
- Specified by:
removeAllIterablein interfaceMutableCollection<T>
-
retainAllIterable
public boolean retainAllIterable(Iterable<?> iterable)
- Specified by:
retainAllIterablein interfaceMutableCollection<T>
-
selectAndRejectWith
public <P> Twin<MutableList<T>> selectAndRejectWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
selectAndRejectWithin interfaceMutableCollection<T>
-
injectIntoWith
public <IV,P> IV injectIntoWith(IV injectValue, Function3<? super IV,? super T,? super P,? extends IV> function, P parameter)- Specified by:
injectIntoWithin interfaceMutableCollection<T>
-
groupByUniqueKey
public <V> MutableMap<V,T> groupByUniqueKey(Function<? super T,? extends V> function)
- Specified by:
groupByUniqueKeyin interfaceMutableCollection<T>- Specified by:
groupByUniqueKeyin interfaceRichIterable<T>- Overrides:
groupByUniqueKeyin 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:
aggregateInPlaceByin interfaceMutableCollection<T>- Specified by:
aggregateInPlaceByin interfaceRichIterable<T>- Overrides:
aggregateInPlaceByin 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:
aggregateByin interfaceMutableCollection<T>- Specified by:
aggregateByin interfaceRichIterable<T>- Overrides:
aggregateByin classAbstractSynchronizedRichIterable<T>
-
sumByInt
public <V> MutableObjectLongMap<V> sumByInt(Function<? super T,? extends V> groupBy, IntFunction<? super T> function)
- Specified by:
sumByIntin interfaceMutableCollection<T>- Specified by:
sumByIntin interfaceRichIterable<T>- Overrides:
sumByIntin classAbstractSynchronizedRichIterable<T>
-
sumByFloat
public <V> MutableObjectDoubleMap<V> sumByFloat(Function<? super T,? extends V> groupBy, FloatFunction<? super T> function)
- Specified by:
sumByFloatin interfaceMutableCollection<T>- Specified by:
sumByFloatin interfaceRichIterable<T>- Overrides:
sumByFloatin classAbstractSynchronizedRichIterable<T>
-
sumByLong
public <V> MutableObjectLongMap<V> sumByLong(Function<? super T,? extends V> groupBy, LongFunction<? super T> function)
- Specified by:
sumByLongin interfaceMutableCollection<T>- Specified by:
sumByLongin interfaceRichIterable<T>- Overrides:
sumByLongin classAbstractSynchronizedRichIterable<T>
-
sumByDouble
public <V> MutableObjectDoubleMap<V> sumByDouble(Function<? super T,? extends V> groupBy, DoubleFunction<? super T> function)
- Specified by:
sumByDoublein interfaceMutableCollection<T>- Specified by:
sumByDoublein interfaceRichIterable<T>- Overrides:
sumByDoublein classAbstractSynchronizedRichIterable<T>
-
-