Class AbstractMutableCollection<T>
- java.lang.Object
-
- org.eclipse.collections.impl.AbstractRichIterable<T>
-
- org.eclipse.collections.impl.collection.mutable.AbstractMutableCollection<T>
-
- All Implemented Interfaces:
Iterable<T>,Collection<T>,MutableCollection<T>,InternalIterable<T>,RichIterable<T>
- Direct Known Subclasses:
AbstractMutableList,AbstractMutableSet,AbstractUnifiedSet,TreeSortedSet
public abstract class AbstractMutableCollection<T> extends AbstractRichIterable<T> implements MutableCollection<T>
-
-
Constructor Summary
Constructors Constructor Description AbstractMutableCollection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(T element)booleanaddAll(Collection<? extends T> source)booleanaddAllIterable(Iterable<? extends T> iterable)RichIterable<RichIterable<T>>chunk(int size)<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> 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)Optional<T>reduce(BinaryOperator<T> accumulator)booleanremove(Object o)booleanremoveAll(Collection<?> source)booleanremoveAllIterable(Iterable<?> iterable)booleanremoveIf(Predicate<? super T> predicate)<P> booleanremoveIfWith(Predicate2<? super T,? super P> predicate, P parameter)booleanretainAll(Collection<?> source)booleanretainAllIterable(Iterable<?> iterable)<P> Twin<MutableList<T>>selectAndRejectWith(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)-
Methods inherited from class org.eclipse.collections.impl.AbstractRichIterable
allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, asLazy, collect, collectIf, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, count, countWith, detect, detectOptional, detectWith, detectWithIfNone, detectWithOptional, flatCollect, forEach, forEachWith, forEachWithIndex, groupBy, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, into, isEmpty, max, max, maxBy, min, min, minBy, noneSatisfy, noneSatisfyWith, reject, rejectWith, select, selectWith, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toBiMap, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndex
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
clear, 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
aggregateBy, aggregateInPlaceBy, asSynchronized, asUnmodifiable, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, flatCollect, flatCollectWith, groupBy, groupByEach, newEmpty, partition, partitionWith, reject, rejectWith, select, selectInstancesOf, selectWith, tap, toImmutable, with, withAll, without, withoutAll, zip, zipWithIndex
-
Methods inherited from interface org.eclipse.collections.api.RichIterable
aggregateBy, allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, 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, 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
-
selectAndRejectWith
public <P> Twin<MutableList<T>> selectAndRejectWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
selectAndRejectWithin interfaceMutableCollection<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>
-
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>
-
reduce
public Optional<T> reduce(BinaryOperator<T> accumulator)
- Specified by:
reducein interfaceRichIterable<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>
-
chunk
public RichIterable<RichIterable<T>> chunk(int size)
- Specified by:
chunkin interfaceRichIterable<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>
-
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>
-
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>
-
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>
-
add
public boolean add(T element)
- Specified by:
addin interfaceCollection<T>
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<T>
-
addAll
public boolean addAll(Collection<? extends T> source)
- Specified by:
addAllin interfaceCollection<T>
-
removeAll
public boolean removeAll(Collection<?> source)
- Specified by:
removeAllin interfaceCollection<T>
-
retainAll
public boolean retainAll(Collection<?> source)
- Specified by:
retainAllin interfaceCollection<T>
-
groupByUniqueKey
public <V> MutableMap<V,T> groupByUniqueKey(Function<? super T,? extends V> function)
- Specified by:
groupByUniqueKeyin interfaceMutableCollection<T>- Specified by:
groupByUniqueKeyin interfaceRichIterable<T>
-
countBy
public <V> MutableBag<V> countBy(Function<? super T,? extends V> function)
- Specified by:
countByin interfaceMutableCollection<T>- Specified by:
countByin interfaceRichIterable<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>- 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 classAbstractRichIterable<T>- Since:
- 10.0.0
-
-