public class HashBag<T> extends AbstractHashBag<T> implements Externalizable
| Modifier and Type | Method and Description |
|---|---|
static <E> HashBag<E> |
newBag() |
static <E> HashBag<E> |
newBag(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) |
MutableBag<T> |
newEmpty() |
void |
readExternal(ObjectInput in) |
MutableBag<T> |
selectByOccurrences(IntPredicate predicate) |
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) |
add, addOccurrences, allSatisfyWithOccurrences, anySatisfyWithOccurrences, clear, contains, detectWithOccurrences, distinctView, each, equals, forEachWith, forEachWithIndex, forEachWithOccurrences, groupBy, groupByEach, hashCode, isEmpty, iterator, noneSatisfyWithOccurrences, occurrencesOf, remove, removeAllIterable, removeIf, removeIfWith, removeOccurrences, setOccurrences, size, sizeDistinct, toMapOfItemToCountasParallel, asSynchronized, asUnmodifiable, collect, collectIf, collectWith, collectWithOccurrences, countBy, countByEach, countByWith, flatCollect, partition, partitionWith, reject, rejectWith, select, selectInstancesOf, selectWith, tap, toImmutable, zip, zipWithIndexaddAll, 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, topOccurrencescollect, 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, toStringOfItemToCountappendString, appendString, asLazy, containsAll, containsAllArguments, containsAllIterable, countWith, forEach, groupByUniqueKey, into, toArray, toArray, toBiMap, toMap, toSortedBagBy, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSetBy, toString, zip, zipWithIndexcollectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, flatCollectWith, selectDuplicates, selectUnique, toImmutableBagbottomOccurrences, topOccurrencesaggregateBy, collectWithOccurrences, reduceInPlace, reduceInPlace, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, toStringOfItemToCountaddAllIterable, aggregateBy, aggregateInPlaceBy, groupByUniqueKey, injectIntoWith, retainAllIterable, selectAndRejectWith, sumByDouble, sumByFloat, sumByInt, sumByLongaddAll, containsAll, 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, 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, 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, zipWithIndexforEachpublic static <E> HashBag<E> newBag()
public static <E> HashBag<E> newBag(int size)
public static <E> HashBag<E> newBagWith(E... elements)
public MutableBag<T> selectByOccurrences(IntPredicate predicate)
selectByOccurrences in interface Bag<T>selectByOccurrences in interface MutableBag<T>selectByOccurrences in interface MutableBagIterable<T>selectByOccurrences in interface UnsortedBag<T>public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic HashBag<T> without(T element)
without in interface MutableBag<T>without in interface MutableBagIterable<T>without in interface MutableCollection<T>public MutableBag<T> newEmpty()
newEmpty in interface MutableBag<T>newEmpty in interface MutableCollection<T>public HashBag<T> with(T element)
with in interface MutableBag<T>with in interface MutableBagIterable<T>with in interface MutableCollection<T>public HashBag<T> withAll(Iterable<? extends T> iterable)
withAll in interface MutableBag<T>withAll in interface MutableBagIterable<T>withAll in interface MutableCollection<T>public HashBag<T> withoutAll(Iterable<? extends T> iterable)
withoutAll in interface MutableBag<T>withoutAll in interface MutableBagIterable<T>withoutAll in interface MutableCollection<T>Copyright © 2004–2022. All rights reserved.