Class AbstractHashBag<T>
java.lang.Object
org.eclipse.collections.impl.AbstractRichIterable<T>
org.eclipse.collections.impl.bag.AbstractBag<T>
org.eclipse.collections.impl.bag.mutable.AbstractMutableBagIterable<T>
org.eclipse.collections.impl.bag.mutable.AbstractMutableBag<T>
org.eclipse.collections.impl.bag.mutable.AbstractHashBag<T>
- All Implemented Interfaces:
Iterable<T>,Collection<T>,Bag<T>,MutableBag<T>,MutableBagIterable<T>,UnsortedBag<T>,MutableCollection<T>,InternalIterable<T>,RichIterable<T>
- Direct Known Subclasses:
HashBag,HashBagWithHashingStrategy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanintaddOccurrences(T item, int occurrences) booleanallSatisfyWithOccurrences(ObjectIntPredicate<? super T> predicate) booleananySatisfyWithOccurrences(ObjectIntPredicate<? super T> predicate) voidclear()booleandetectWithOccurrences(ObjectIntPredicate<? super T> predicate) voidboolean<P> voidforEachWith(Procedure2<? super T, ? super P> procedure, P parameter) voidforEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure) voidforEachWithOccurrences(ObjectIntProcedure<? super T> objectIntProcedure) <V> HashBagMultimap<V,T> <V> HashBagMultimap<V,T> groupByEach(Function<? super T, ? extends Iterable<V>> function) inthashCode()booleanisEmpty()iterator()booleannoneSatisfyWithOccurrences(ObjectIntPredicate<? super T> predicate) intoccurrencesOf(Object item) booleanbooleanremoveAllIterable(Iterable<?> iterable) boolean<P> booleanremoveIfWith(Predicate2<? super T, ? super P> predicate, P parameter) booleanremoveOccurrences(Object item, int occurrences) booleansetOccurrences(T item, int occurrences) intsize()intMethods inherited from class org.eclipse.collections.impl.bag.mutable.AbstractMutableBag
asParallel, asSynchronized, asUnmodifiable, collect, collectIf, collectWith, collectWithOccurrences, countBy, countByEach, countByWith, flatCollect, partition, partitionWith, reject, rejectWith, select, selectInstancesOf, selectWith, tap, toImmutable, zip, zipWithIndexMethods inherited from class org.eclipse.collections.impl.bag.mutable.AbstractMutableBagIterable
addAll, addAllIterable, allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, bottomOccurrences, chunk, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, getFirst, getLast, groupByUniqueKey, max, max, maxBy, min, min, minBy, noneSatisfy, noneSatisfyWith, removeAll, retainAll, retainAllIterable, selectAndRejectWith, sumByDouble, sumByFloat, sumByInt, sumByLong, topOccurrencesMethods 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, toArray, toArray, toBag, toList, toSet, toSortedBag, toSortedBag, toSortedList, toSortedSet, toSortedSet, toStringOfItemToCountMethods inherited from class org.eclipse.collections.impl.AbstractRichIterable
appendString, appendString, asLazy, containsAll, containsAllArguments, containsAllIterable, countWith, forEach, groupByUniqueKey, into, toBiMap, toMap, toSortedBagBy, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSetBy, toString, zip, zipWithIndexMethods inherited from interface org.eclipse.collections.api.bag.Bag
aggregateBy, collectWithOccurrences, reduceBy, reduceInPlace, reduceInPlace, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, toStringOfItemToCountMethods inherited from interface java.util.Collection
addAll, containsAll, parallelStream, removeAll, removeIf, retainAll, spliterator, stream, toArrayMethods inherited from interface org.eclipse.collections.api.InternalIterable
forEachMethods inherited from interface org.eclipse.collections.api.bag.MutableBag
collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, flatCollectWith, newEmpty, selectByOccurrences, selectDuplicates, selectUnique, toImmutableBag, with, withAll, withOccurrences, without, withoutAll, withoutOccurrencesMethods inherited from interface org.eclipse.collections.api.bag.MutableBagIterable
bottomOccurrences, selectByOccurrences, selectDuplicates, selectUnique, topOccurrencesMethods inherited from interface org.eclipse.collections.api.collection.MutableCollection
addAllIterable, aggregateBy, aggregateInPlaceBy, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, flatCollectWith, groupByUniqueKey, injectIntoWith, retainAllIterable, selectAndRejectWith, sumByDouble, sumByFloat, sumByInt, sumByLong, toArray, toArrayMethods inherited from interface org.eclipse.collections.api.RichIterable
allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, containsAll, containsAllArguments, containsAllIterable, containsAny, containsAnyIterable, containsBy, containsNone, containsNoneIterable, count, countBy, countByEach, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, 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, makeString, makeString, makeString, makeString, max, max, maxBy, maxByOptional, maxOptional, maxOptional, min, min, minBy, minByOptional, minOptional, minOptional, noneSatisfy, noneSatisfyWith, notEmpty, reduce, reduceBy, reject, rejectWith, select, selectWith, 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
-
Constructor Details
-
AbstractHashBag
public AbstractHashBag()
-
-
Method Details
-
addOccurrences
-
equals
-
hashCode
public int hashCode() -
sizeDistinct
public int sizeDistinct() -
occurrencesOf
-
forEachWithOccurrences
-
anySatisfyWithOccurrences
-
allSatisfyWithOccurrences
-
noneSatisfyWithOccurrences
-
detectWithOccurrences
-
toMapOfItemToCount
-
add
-
remove
-
clear
public void clear() -
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<T>- Specified by:
isEmptyin interfaceRichIterable<T>- Overrides:
isEmptyin classAbstractRichIterable<T>
-
each
-
forEachWithIndex
- Specified by:
forEachWithIndexin interfaceInternalIterable<T>- Overrides:
forEachWithIndexin classAbstractRichIterable<T>
-
forEachWith
- Specified by:
forEachWithin interfaceInternalIterable<T>- Overrides:
forEachWithin classAbstractRichIterable<T>
-
iterator
-
removeOccurrences
-
setOccurrences
-
removeIf
-
removeIfWith
-
removeAllIterable
-
size
public int size() -
contains
- Specified by:
containsin interfaceCollection<T>- Specified by:
containsin interfaceRichIterable<T>- Overrides:
containsin classAbstractRichIterable<T>
-
groupBy
-
groupByEach
-
distinctView
-