Class AbstractImmutableBag<T>
- java.lang.Object
-
- org.eclipse.collections.impl.AbstractRichIterable<T>
-
- org.eclipse.collections.impl.bag.AbstractBag<T>
-
- org.eclipse.collections.impl.bag.immutable.AbstractImmutableBagIterable<T>
-
- org.eclipse.collections.impl.bag.immutable.AbstractImmutableBag<T>
-
- All Implemented Interfaces:
Iterable<T>,Collection<T>,Bag<T>,ImmutableBag<T>,ImmutableBagIterable<T>,UnsortedBag<T>,ImmutableCollection<T>,InternalIterable<T>,RichIterable<T>
- Direct Known Subclasses:
ImmutableArrayBag,ImmutableHashBag
public abstract class AbstractImmutableBag<T> extends AbstractImmutableBagIterable<T> implements ImmutableBag<T>
- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description AbstractImmutableBag()
-
Method Summary
-
Methods inherited from class org.eclipse.collections.impl.bag.immutable.AbstractImmutableBagIterable
add, addAll, castToCollection, clear, parallelStream, remove, removeAll, retainAll, spliterator, stream, sumByDouble, sumByFloat, sumByInt, sumByLong
-
Methods inherited from class org.eclipse.collections.impl.bag.AbstractBag
collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, count, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, groupBy, groupByEach, injectInto, injectInto, injectInto, injectInto, injectInto, injectIntoWith, reject, rejectWith, select, selectWith, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toBag, toList, toSet, toSortedBag, toSortedBag, toSortedList, toSortedSet, toSortedSet, toStringOfItemToCount
-
Methods inherited from class org.eclipse.collections.impl.AbstractRichIterable
allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, asLazy, contains, containsAll, containsAllArguments, containsAllIterable, countWith, detect, detectOptional, detectWith, detectWithIfNone, detectWithOptional, forEach, forEachWith, forEachWithIndex, groupByUniqueKey, into, isEmpty, max, max, maxBy, min, min, minBy, noneSatisfy, noneSatisfyWith, toArray, toArray, toBiMap, toMap, toSortedBagBy, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSetBy, toString, zip, zipWithIndex
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.collections.api.bag.Bag
aggregateBy, allSatisfyWithOccurrences, anySatisfyWithOccurrences, collectWithOccurrences, detectWithOccurrences, distinctView, equals, forEachWithOccurrences, hashCode, noneSatisfyWithOccurrences, occurrencesOf, reduceInPlace, reduceInPlace, sizeDistinct, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, toStringOfItemToCount
-
Methods inherited from interface java.util.Collection
contains, containsAll, equals, hashCode, isEmpty, iterator, removeIf, size, toArray, toArray, toArray
-
Methods inherited from interface org.eclipse.collections.api.bag.ImmutableBag
collect, collectIf, flatCollect, flatCollectWith, groupBy, groupByEach, newWith, newWithAll, newWithout, reject, select, selectByOccurrences, selectDuplicates, selectInstancesOf, selectUnique, toImmutableBag, zip, zipWithIndex
-
Methods inherited from interface org.eclipse.collections.api.bag.ImmutableBagIterable
groupBy, groupByEach, reject, select, selectByOccurrences, selectDuplicates, selectInstancesOf, selectUnique, toMapOfItemToCount, zipWithIndex
-
Methods inherited from interface org.eclipse.collections.api.collection.ImmutableCollection
aggregateBy, aggregateInPlaceBy, castToCollection, collect, collectIf, flatCollect, flatCollectWith, parallelStream, spliterator, stream, sumByDouble, sumByFloat, sumByInt, sumByLong, zip
-
Methods inherited from interface org.eclipse.collections.api.InternalIterable
forEach, forEachWith, forEachWithIndex
-
Methods inherited from interface org.eclipse.collections.api.RichIterable
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, reduce, reject, rejectWith, select, selectWith, size, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toBiMap, 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
-
newWithoutAll
public ImmutableBag<T> newWithoutAll(Iterable<? extends T> elements)
- Specified by:
newWithoutAllin interfaceImmutableBag<T>- Specified by:
newWithoutAllin interfaceImmutableCollection<T>
-
toImmutable
public ImmutableBag<T> toImmutable()
- Specified by:
toImmutablein interfaceBag<T>
-
tap
public ImmutableBag<T> tap(Procedure<? super T> procedure)
- Specified by:
tapin interfaceBag<T>- Specified by:
tapin interfaceImmutableBag<T>- Specified by:
tapin interfaceImmutableBagIterable<T>- Specified by:
tapin interfaceImmutableCollection<T>- Specified by:
tapin interfaceRichIterable<T>- Specified by:
tapin interfaceUnsortedBag<T>
-
selectWith
public <P> ImmutableBag<T> selectWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
selectWithin interfaceBag<T>- Specified by:
selectWithin interfaceImmutableBag<T>- Specified by:
selectWithin interfaceImmutableBagIterable<T>- Specified by:
selectWithin interfaceImmutableCollection<T>- Specified by:
selectWithin interfaceRichIterable<T>- Specified by:
selectWithin interfaceUnsortedBag<T>
-
rejectWith
public <P> ImmutableBag<T> rejectWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
rejectWithin interfaceBag<T>- Specified by:
rejectWithin interfaceImmutableBag<T>- Specified by:
rejectWithin interfaceImmutableBagIterable<T>- Specified by:
rejectWithin interfaceImmutableCollection<T>- Specified by:
rejectWithin interfaceRichIterable<T>- Specified by:
rejectWithin interfaceUnsortedBag<T>
-
partition
public PartitionImmutableBag<T> partition(Predicate<? super T> predicate)
- Specified by:
partitionin interfaceBag<T>- Specified by:
partitionin interfaceImmutableBag<T>- Specified by:
partitionin interfaceImmutableBagIterable<T>- Specified by:
partitionin interfaceImmutableCollection<T>- Specified by:
partitionin interfaceRichIterable<T>- Specified by:
partitionin interfaceUnsortedBag<T>
-
partitionWith
public <P> PartitionImmutableBag<T> partitionWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
partitionWithin interfaceBag<T>- Specified by:
partitionWithin interfaceImmutableBag<T>- Specified by:
partitionWithin interfaceImmutableBagIterable<T>- Specified by:
partitionWithin interfaceImmutableCollection<T>- Specified by:
partitionWithin interfaceRichIterable<T>
-
countBy
public <V> ImmutableBag<V> countBy(Function<? super T,? extends V> function)
- Specified by:
countByin interfaceImmutableBag<T>- Specified by:
countByin interfaceImmutableCollection<T>- Specified by:
countByin interfaceRichIterable<T>- Overrides:
countByin classAbstractImmutableBagIterable<T>- Since:
- 9.0
-
countByWith
public <V,P> ImmutableBag<V> countByWith(Function2<? super T,? super P,? extends V> function, P parameter)
- Specified by:
countByWithin interfaceImmutableBag<T>- Specified by:
countByWithin interfaceImmutableCollection<T>- Specified by:
countByWithin interfaceRichIterable<T>- Overrides:
countByWithin classAbstractImmutableBagIterable<T>- Since:
- 9.0
-
countByEach
public <V> ImmutableBag<V> countByEach(Function<? super T,? extends Iterable<V>> function)
- Specified by:
countByEachin interfaceImmutableBag<T>- Specified by:
countByEachin interfaceImmutableCollection<T>- Specified by:
countByEachin interfaceRichIterable<T>- Overrides:
countByEachin classAbstractImmutableBagIterable<T>- Since:
- 10.0.0
-
collectWithOccurrences
public <V> ImmutableBag<V> collectWithOccurrences(ObjectIntToObjectFunction<? super T,? extends V> function)
- Specified by:
collectWithOccurrencesin interfaceBag<T>- Specified by:
collectWithOccurrencesin interfaceImmutableBag<T>- Specified by:
collectWithOccurrencesin interfaceImmutableBagIterable<T>- Specified by:
collectWithOccurrencesin interfaceUnsortedBag<T>
-
collectWith
public <P,V> ImmutableBag<V> collectWith(Function2<? super T,? super P,? extends V> function, P parameter)
- Specified by:
collectWithin interfaceImmutableBag<T>- Specified by:
collectWithin interfaceImmutableCollection<T>- Specified by:
collectWithin interfaceRichIterable<T>- Specified by:
collectWithin interfaceUnsortedBag<T>
-
collectBoolean
public ImmutableBooleanBag collectBoolean(BooleanFunction<? super T> booleanFunction)
- Specified by:
collectBooleanin interfaceImmutableBag<T>- Specified by:
collectBooleanin interfaceImmutableCollection<T>- Specified by:
collectBooleanin interfaceRichIterable<T>- Specified by:
collectBooleanin interfaceUnsortedBag<T>
-
collectByte
public ImmutableByteBag collectByte(ByteFunction<? super T> byteFunction)
- Specified by:
collectBytein interfaceImmutableBag<T>- Specified by:
collectBytein interfaceImmutableCollection<T>- Specified by:
collectBytein interfaceRichIterable<T>- Specified by:
collectBytein interfaceUnsortedBag<T>
-
collectChar
public ImmutableCharBag collectChar(CharFunction<? super T> charFunction)
- Specified by:
collectCharin interfaceImmutableBag<T>- Specified by:
collectCharin interfaceImmutableCollection<T>- Specified by:
collectCharin interfaceRichIterable<T>- Specified by:
collectCharin interfaceUnsortedBag<T>
-
collectDouble
public ImmutableDoubleBag collectDouble(DoubleFunction<? super T> doubleFunction)
- Specified by:
collectDoublein interfaceImmutableBag<T>- Specified by:
collectDoublein interfaceImmutableCollection<T>- Specified by:
collectDoublein interfaceRichIterable<T>- Specified by:
collectDoublein interfaceUnsortedBag<T>
-
collectFloat
public ImmutableFloatBag collectFloat(FloatFunction<? super T> floatFunction)
- Specified by:
collectFloatin interfaceImmutableBag<T>- Specified by:
collectFloatin interfaceImmutableCollection<T>- Specified by:
collectFloatin interfaceRichIterable<T>- Specified by:
collectFloatin interfaceUnsortedBag<T>
-
collectInt
public ImmutableIntBag collectInt(IntFunction<? super T> intFunction)
- Specified by:
collectIntin interfaceImmutableBag<T>- Specified by:
collectIntin interfaceImmutableCollection<T>- Specified by:
collectIntin interfaceRichIterable<T>- Specified by:
collectIntin interfaceUnsortedBag<T>
-
collectLong
public ImmutableLongBag collectLong(LongFunction<? super T> longFunction)
- Specified by:
collectLongin interfaceImmutableBag<T>- Specified by:
collectLongin interfaceImmutableCollection<T>- Specified by:
collectLongin interfaceRichIterable<T>- Specified by:
collectLongin interfaceUnsortedBag<T>
-
collectShort
public ImmutableShortBag collectShort(ShortFunction<? super T> shortFunction)
- Specified by:
collectShortin interfaceImmutableBag<T>- Specified by:
collectShortin interfaceImmutableCollection<T>- Specified by:
collectShortin interfaceRichIterable<T>- Specified by:
collectShortin interfaceUnsortedBag<T>
-
topOccurrences
public ImmutableList<ObjectIntPair<T>> topOccurrences(int n)
- Specified by:
topOccurrencesin interfaceBag<T>- Specified by:
topOccurrencesin interfaceImmutableBag<T>
-
bottomOccurrences
public ImmutableList<ObjectIntPair<T>> bottomOccurrences(int n)
- Specified by:
bottomOccurrencesin interfaceBag<T>- Specified by:
bottomOccurrencesin interfaceImmutableBag<T>
-
groupByUniqueKey
public <V> ImmutableMap<V,T> groupByUniqueKey(Function<? super T,? extends V> function)
- Specified by:
groupByUniqueKeyin interfaceImmutableCollection<T>- Specified by:
groupByUniqueKeyin interfaceRichIterable<T>
-
chunk
public RichIterable<RichIterable<T>> chunk(int size)
- Specified by:
chunkin interfaceRichIterable<T>
-
-