Class AbstractImmutableCollection<T>
java.lang.Object
org.eclipse.collections.impl.AbstractRichIterable<T>
org.eclipse.collections.impl.collection.immutable.AbstractImmutableCollection<T>
- All Implemented Interfaces:
Iterable<T>,Collection<T>,ImmutableCollection<T>,InternalIterable<T>,RichIterable<T>
- Direct Known Subclasses:
AbstractImmutableSet
public abstract class AbstractImmutableCollection<T>
extends AbstractRichIterable<T>
implements ImmutableCollection<T>, Collection<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends T> collection) chunk(int size) voidclear()<V> ImmutableBag<V><V> ImmutableBag<V>countByEach(Function<? super T, ? extends Iterable<V>> function) <V,P> ImmutableBag<V> countByWith(Function2<? super T, ? super P, ? extends V> function, P parameter) <V> ImmutableMap<V,T> groupByUniqueKey(Function<? super T, ? extends V> function) reduce(BinaryOperator<T> accumulator) booleanbooleanremoveAll(Collection<?> collection) booleanretainAll(Collection<?> collection) stream()<V> ImmutableObjectDoubleMap<V>sumByDouble(Function<? super T, ? extends V> groupBy, DoubleFunction<? super T> function) <V> ImmutableObjectDoubleMap<V>sumByFloat(Function<? super T, ? extends V> groupBy, FloatFunction<? super T> function) <V> ImmutableObjectLongMap<V>sumByInt(Function<? super T, ? extends V> groupBy, IntFunction<? super T> function) <V> ImmutableObjectLongMap<V>sumByLong(Function<? super T, ? extends V> groupBy, LongFunction<? super T> function) Object[]toArray()<E> E[]toArray(E[] array) 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, toBag, toBiMap, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndexMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
contains, containsAll, equals, hashCode, isEmpty, iterator, removeIf, size, toArrayMethods inherited from interface org.eclipse.collections.api.collection.ImmutableCollection
aggregateBy, aggregateInPlaceBy, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, flatCollect, flatCollectWith, groupBy, groupByEach, newWith, newWithAll, newWithout, newWithoutAll, partition, partitionWith, reduceBy, reject, rejectWith, select, selectInstancesOf, selectWith, tap, zip, zipWithIndexMethods inherited from interface org.eclipse.collections.api.InternalIterable
forEach, forEachWith, forEachWithIndexMethods 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, reduceBy, reduceInPlace, reduceInPlace, reject, rejectWith, select, selectWith, size, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, 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
-
Constructor Details
-
AbstractImmutableCollection
public AbstractImmutableCollection()
-
-
Method Details
-
toArray
- Specified by:
toArrayin interfaceCollection<T>- Specified by:
toArrayin interfaceRichIterable<T>
-
toArray
public <E> E[] toArray(E[] array) - Specified by:
toArrayin interfaceCollection<T>- Specified by:
toArrayin interfaceRichIterable<T>
-
reduce
- Specified by:
reducein interfaceRichIterable<T>
-
sumByInt
public <V> ImmutableObjectLongMap<V> sumByInt(Function<? super T, ? extends V> groupBy, IntFunction<? super T> function) - Specified by:
sumByIntin interfaceImmutableCollection<T>- Specified by:
sumByIntin interfaceRichIterable<T>
-
sumByFloat
public <V> ImmutableObjectDoubleMap<V> sumByFloat(Function<? super T, ? extends V> groupBy, FloatFunction<? super T> function) - Specified by:
sumByFloatin interfaceImmutableCollection<T>- Specified by:
sumByFloatin interfaceRichIterable<T>
-
sumByLong
public <V> ImmutableObjectLongMap<V> sumByLong(Function<? super T, ? extends V> groupBy, LongFunction<? super T> function) - Specified by:
sumByLongin interfaceImmutableCollection<T>- Specified by:
sumByLongin interfaceRichIterable<T>
-
sumByDouble
public <V> ImmutableObjectDoubleMap<V> sumByDouble(Function<? super T, ? extends V> groupBy, DoubleFunction<? super T> function) - Specified by:
sumByDoublein interfaceImmutableCollection<T>- Specified by:
sumByDoublein interfaceRichIterable<T>
-
groupByUniqueKey
- Specified by:
groupByUniqueKeyin interfaceImmutableCollection<T>- Specified by:
groupByUniqueKeyin interfaceRichIterable<T>
-
add
- Specified by:
addin interfaceCollection<T>
-
remove
- Specified by:
removein interfaceCollection<T>
-
addAll
- Specified by:
addAllin interfaceCollection<T>
-
removeAll
- Specified by:
removeAllin interfaceCollection<T>
-
retainAll
- Specified by:
retainAllin interfaceCollection<T>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<T>
-
chunk
- Specified by:
chunkin interfaceRichIterable<T>
-
countBy
- Specified by:
countByin interfaceImmutableCollection<T>- Specified by:
countByin interfaceRichIterable<T>- Since:
- 9.0
-
countByWith
public <V,P> ImmutableBag<V> countByWith(Function2<? super T, ? super P, ? extends V> function, P parameter) - Specified by:
countByWithin interfaceImmutableCollection<T>- Specified by:
countByWithin interfaceRichIterable<T>- Since:
- 9.0
-
countByEach
- Specified by:
countByEachin interfaceImmutableCollection<T>- Specified by:
countByEachin interfaceRichIterable<T>- Overrides:
countByEachin classAbstractRichIterable<T>- Since:
- 10.0.0
-
stream
- Specified by:
streamin interfaceCollection<T>- Specified by:
streamin interfaceImmutableCollection<T>- Since:
- 9.0
-
parallelStream
- Specified by:
parallelStreamin interfaceCollection<T>- Specified by:
parallelStreamin interfaceImmutableCollection<T>- Since:
- 9.0
-
spliterator
- Specified by:
spliteratorin interfaceCollection<T>- Specified by:
spliteratorin interfaceImmutableCollection<T>- Specified by:
spliteratorin interfaceIterable<T>- Since:
- 9.0
-
castToCollection
- Specified by:
castToCollectionin interfaceImmutableCollection<T>- Since:
- 9.0
-