public class HashBag<T> extends AbstractMutableBag<T> implements Externalizable
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T item) |
boolean |
addAll(Collection<? extends T> source) |
void |
addOccurrences(T item,
int occurrences) |
void |
clear() |
boolean |
contains(Object o) |
void |
each(com.gs.collections.api.block.procedure.Procedure<? super T> procedure) |
boolean |
equals(Object other) |
<P> void |
forEachWith(com.gs.collections.api.block.procedure.Procedure2<? super T,? super P> procedure,
P parameter) |
void |
forEachWithIndex(com.gs.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T> objectIntProcedure) |
void |
forEachWithOccurrences(com.gs.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T> objectIntProcedure) |
<V> HashBagMultimap<V,T> |
groupBy(com.gs.collections.api.block.function.Function<? super T,? extends V> function) |
<V> HashBagMultimap<V,T> |
groupByEach(com.gs.collections.api.block.function.Function<? super T,? extends Iterable<V>> function) |
int |
hashCode() |
boolean |
isEmpty() |
Iterator<T> |
iterator() |
static <E> HashBag<E> |
newBag() |
static <E> HashBag<E> |
newBag(com.gs.collections.api.bag.Bag<? extends E> source) |
static <E> HashBag<E> |
newBag(int size) |
static <E> HashBag<E> |
newBag(Iterable<? extends E> source) |
static <E> HashBag<E> |
newBagWith(E... elements) |
com.gs.collections.api.bag.MutableBag<T> |
newEmpty() |
int |
occurrencesOf(Object item) |
void |
readExternal(ObjectInput in) |
boolean |
remove(Object item) |
boolean |
removeAllIterable(Iterable<?> iterable) |
boolean |
removeIf(com.gs.collections.api.block.predicate.Predicate<? super T> predicate) |
<P> boolean |
removeIfWith(com.gs.collections.api.block.predicate.Predicate2<? super T,? super P> predicate,
P parameter) |
boolean |
removeOccurrences(Object item,
int occurrences) |
com.gs.collections.api.bag.MutableBag<T> |
selectByOccurrences(com.gs.collections.api.block.predicate.primitive.IntPredicate predicate) |
boolean |
setOccurrences(T item,
int occurrences) |
int |
size() |
int |
sizeDistinct() |
com.gs.collections.api.map.MutableMap<T,Integer> |
toMapOfItemToCount() |
HashBag<T> |
with(T... elements) |
HashBag<T> |
with(T element) |
HashBag<T> |
with(T element1,
T element2) |
HashBag<T> |
with(T element1,
T element2,
T element3) |
HashBag<T> |
withAll(Iterable<? extends T> iterable) |
HashBag<T> |
without(T element) |
HashBag<T> |
withoutAll(Iterable<? extends T> iterable) |
void |
writeExternal(ObjectOutput out) |
asParallel, asSynchronized, asUnmodifiable, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, flatCollect, partition, partitionWith, reject, rejectWith, select, selectInstancesOf, selectWith, tap, toImmutable, zip, zipWithIndexaddAllIterable, aggregateBy, aggregateInPlaceBy, allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, bottomOccurrences, chunk, detect, detectIfNone, detectWith, detectWithIfNone, getFirst, getLast, groupByUniqueKey, max, max, maxBy, min, min, minBy, noneSatisfy, noneSatisfyWith, removeAll, retainAll, retainAllIterable, selectAndRejectWith, topOccurrencescollect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, count, flatCollect, groupBy, groupByEach, injectInto, injectInto, injectInto, injectInto, injectInto, injectIntoWith, reject, rejectWith, select, selectWith, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toBag, toList, toSet, toSortedBag, toSortedBag, toSortedList, toSortedSet, toSortedSet, toStringOfItemToCountappendString, appendString, appendString, asLazy, containsAll, containsAllArguments, containsAllIterable, countWith, forEach, groupByUniqueKey, makeString, makeString, makeString, notEmpty, sumByDouble, sumByFloat, sumByInt, sumByLong, toArray, toArray, toMap, toSortedBagBy, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedSetBy, toString, zip, zipWithIndexbottomOccurrences, topOccurrencesaddAllIterable, aggregateBy, aggregateInPlaceBy, groupByUniqueKey, injectIntoWith, retainAllIterable, selectAndRejectWithcontainsAll, parallelStream, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArrayallSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, containsAll, containsAllArguments, containsAllIterable, count, countWith, detect, detectIfNone, detectWith, detectWithIfNone, flatCollect, getFirst, getLast, groupBy, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, makeString, makeString, makeString, max, max, maxBy, min, min, minBy, noneSatisfy, noneSatisfyWith, notEmpty, reject, rejectWith, select, selectWith, sumByDouble, sumByFloat, sumByInt, sumByLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndexpublic static <E> HashBag<E> newBag()
public static <E> HashBag<E> newBag(int size)
public static <E> HashBag<E> newBag(com.gs.collections.api.bag.Bag<? extends E> source)
public static <E> HashBag<E> newBagWith(E... elements)
public boolean addAll(Collection<? extends T> source)
addAll in interface Collection<T>addAll in class AbstractMutableBagIterable<T>public void addOccurrences(T item, int occurrences)
addOccurrences in interface com.gs.collections.api.bag.MutableBagIterable<T>public boolean equals(Object other)
public int hashCode()
public int sizeDistinct()
sizeDistinct in interface com.gs.collections.api.bag.Bag<T>public int occurrencesOf(Object item)
occurrencesOf in interface com.gs.collections.api.bag.Bag<T>public void forEachWithOccurrences(com.gs.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T> objectIntProcedure)
forEachWithOccurrences in interface com.gs.collections.api.bag.Bag<T>public com.gs.collections.api.bag.MutableBag<T> selectByOccurrences(com.gs.collections.api.block.predicate.primitive.IntPredicate predicate)
selectByOccurrences in interface com.gs.collections.api.bag.Bag<T>selectByOccurrences in interface com.gs.collections.api.bag.MutableBag<T>selectByOccurrences in interface com.gs.collections.api.bag.MutableBagIterable<T>selectByOccurrences in interface com.gs.collections.api.bag.UnsortedBag<T>public boolean remove(Object item)
remove in interface Collection<T>public void clear()
clear in interface Collection<T>public boolean isEmpty()
isEmpty in interface com.gs.collections.api.RichIterable<T>isEmpty in interface Collection<T>isEmpty in class AbstractRichIterable<T>public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void each(com.gs.collections.api.block.procedure.Procedure<? super T> procedure)
each in interface com.gs.collections.api.RichIterable<T>public void forEachWithIndex(com.gs.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T> objectIntProcedure)
forEachWithIndex in interface com.gs.collections.api.InternalIterable<T>forEachWithIndex in class AbstractRichIterable<T>public <P> void forEachWith(com.gs.collections.api.block.procedure.Procedure2<? super T,? super P> procedure, P parameter)
forEachWith in interface com.gs.collections.api.InternalIterable<T>forEachWith in class AbstractRichIterable<T>public boolean removeOccurrences(Object item, int occurrences)
removeOccurrences in interface com.gs.collections.api.bag.MutableBagIterable<T>public boolean setOccurrences(T item, int occurrences)
setOccurrences in interface com.gs.collections.api.bag.MutableBagIterable<T>public com.gs.collections.api.bag.MutableBag<T> newEmpty()
public boolean removeIf(com.gs.collections.api.block.predicate.Predicate<? super T> predicate)
removeIf in interface com.gs.collections.api.collection.MutableCollection<T>public <P> boolean removeIfWith(com.gs.collections.api.block.predicate.Predicate2<? super T,? super P> predicate, P parameter)
removeIfWith in interface com.gs.collections.api.collection.MutableCollection<T>public boolean removeAllIterable(Iterable<?> iterable)
removeAllIterable in interface com.gs.collections.api.collection.MutableCollection<T>public int size()
size in interface com.gs.collections.api.RichIterable<T>size in interface Collection<T>public boolean contains(Object o)
contains in interface com.gs.collections.api.RichIterable<T>contains in interface Collection<T>contains in class AbstractRichIterable<T>public <V> HashBagMultimap<V,T> groupBy(com.gs.collections.api.block.function.Function<? super T,? extends V> function)
groupBy in interface com.gs.collections.api.bag.Bag<T>groupBy in interface com.gs.collections.api.bag.MutableBag<T>groupBy in interface com.gs.collections.api.bag.MutableBagIterable<T>groupBy in interface com.gs.collections.api.bag.UnsortedBag<T>groupBy in interface com.gs.collections.api.collection.MutableCollection<T>groupBy in interface com.gs.collections.api.RichIterable<T>public <V> HashBagMultimap<V,T> groupByEach(com.gs.collections.api.block.function.Function<? super T,? extends Iterable<V>> function)
groupByEach in interface com.gs.collections.api.bag.Bag<T>groupByEach in interface com.gs.collections.api.bag.MutableBag<T>groupByEach in interface com.gs.collections.api.bag.MutableBagIterable<T>groupByEach in interface com.gs.collections.api.bag.UnsortedBag<T>groupByEach in interface com.gs.collections.api.collection.MutableCollection<T>groupByEach in interface com.gs.collections.api.RichIterable<T>public boolean add(T item)
add in interface Collection<T>Copyright © 2004–2016. All rights reserved.