public class IntHashBag extends AbstractIntIterable implements MutableIntBag, Externalizable
HashBag, and is memory-optimized for int primitives.
This file was automatically generated from template file primitiveHashBag.stg.| Constructor and Description |
|---|
IntHashBag() |
IntHashBag(int... elements) |
IntHashBag(int size) |
IntHashBag(IntHashBag bag) |
IntHashBag(IntIterable iterable) |
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringselectDuplicates, taptoStringOfItemToCountasLazy, average, averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, maxIfEmpty, median, medianIfEmpty, minIfEmpty, reduce, reduceIfEmpty, reject, select, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListByappendString, appendString, makeString, makeString, makeString, toStringpublic IntHashBag()
public IntHashBag(int size)
public IntHashBag(IntIterable iterable)
public IntHashBag(int... elements)
public IntHashBag(IntHashBag bag)
public static IntHashBag newBag(int size)
public static IntHashBag newBagWith(int... source)
public static IntHashBag newBag(IntIterable source)
public static IntHashBag newBag(IntBag source)
public boolean isEmpty()
isEmpty in interface PrimitiveIterablepublic boolean notEmpty()
notEmpty in interface PrimitiveIterablepublic int size()
size in interface PrimitiveIterablepublic int sizeDistinct()
sizeDistinct in interface IntBagpublic void clear()
clear in interface MutableIntCollectionpublic IntHashBag with(int element)
with in interface MutableIntBagwith in interface MutableIntCollectionpublic IntHashBag with(int element1, int element2)
public IntHashBag with(int element1, int element2, int element3)
public IntHashBag withAll(IntIterable iterable)
withAll in interface MutableIntBagwithAll in interface MutableIntCollectionpublic IntHashBag without(int element)
without in interface MutableIntBagwithout in interface MutableIntCollectionpublic IntHashBag withoutAll(IntIterable iterable)
withoutAll in interface MutableIntBagwithoutAll in interface MutableIntCollectionpublic boolean contains(int value)
contains in interface IntIterablepublic int occurrencesOf(int item)
occurrencesOf in interface IntBagpublic void forEachWithOccurrences(IntIntProcedure procedure)
forEachWithOccurrences in interface IntBagpublic IntHashBag selectByOccurrences(IntPredicate predicate)
selectByOccurrences in interface IntBagselectByOccurrences in interface MutableIntBagpublic MutableIntSet selectUnique()
selectUnique in interface IntBagselectUnique in interface MutableIntBagpublic MutableList<IntIntPair> topOccurrences(int count)
topOccurrences in interface IntBagtopOccurrences in interface MutableIntBagpublic MutableList<IntIntPair> bottomOccurrences(int count)
bottomOccurrences in interface IntBagbottomOccurrences in interface MutableIntBagpublic boolean add(int item)
add in interface MutableIntCollectionpublic boolean remove(int item)
remove in interface MutableIntCollectionpublic boolean removeIf(IntPredicate predicate)
removeIf in interface MutableIntCollectionpublic boolean addAll(int... source)
addAll in interface MutableIntCollectionpublic boolean addAll(IntIterable source)
addAll in interface MutableIntCollectionpublic boolean removeAll(int... source)
removeAll in interface MutableIntCollectionpublic boolean removeAll(IntIterable source)
removeAll in interface MutableIntCollectionpublic boolean retainAll(IntIterable source)
retainAll in interface MutableIntCollectionpublic boolean retainAll(int... source)
retainAll in interface MutableIntCollectionpublic void addOccurrences(int item,
int occurrences)
addOccurrences in interface MutableIntBagpublic boolean removeOccurrences(int item,
int occurrences)
removeOccurrences in interface MutableIntBagpublic void each(IntProcedure procedure)
each in interface IntIterablepublic IntHashBag select(IntPredicate predicate)
select in interface IntBagselect in interface MutableIntBagselect in interface MutableIntCollectionselect in interface IntIterablepublic IntHashBag reject(IntPredicate predicate)
reject in interface IntBagreject in interface MutableIntBagreject in interface MutableIntCollectionreject in interface IntIterablepublic <T> T injectInto(T injectedValue,
ObjectIntToObjectFunction<? super T,? extends T> function)
injectInto in interface IntIterablepublic RichIterable<IntIterable> chunk(int size)
chunk in interface IntIterablepublic boolean equals(Object otherBag)
public int hashCode()
public void appendString(Appendable appendable, String start, String separator, String end)
appendString in interface PrimitiveIterablepublic int count(IntPredicate predicate)
count in interface IntIterablepublic boolean anySatisfy(IntPredicate predicate)
anySatisfy in interface IntIterablepublic boolean allSatisfy(IntPredicate predicate)
allSatisfy in interface IntIterablepublic boolean noneSatisfy(IntPredicate predicate)
noneSatisfy in interface IntIterablepublic int detectIfNone(IntPredicate predicate, int ifNone)
detectIfNone in interface IntIterablepublic <V> MutableBag<V> collect(IntToObjectFunction<? extends V> function)
collect in interface IntBagcollect in interface MutableIntBagcollect in interface MutableIntCollectioncollect in interface IntIterablepublic int max()
max in interface IntIterablepublic int min()
min in interface IntIterablepublic long sum()
sum in interface IntIterablepublic int[] toArray()
toArray in interface IntIterablepublic int[] toArray(int[] array)
toArray in interface IntIterablepublic MutableIntBag asUnmodifiable()
asUnmodifiable in interface MutableIntBagasUnmodifiable in interface MutableIntCollectionpublic MutableIntBag asSynchronized()
asSynchronized in interface MutableIntBagasSynchronized in interface MutableIntCollectionpublic ImmutableIntBag toImmutable()
toImmutable in interface IntBagtoImmutable in interface MutableIntBagtoImmutable in interface MutableIntCollectionpublic IntHashBag newEmpty()
newEmpty in interface MutableIntBagnewEmpty in interface MutableIntCollectionpublic MutableIntIterator intIterator()
intIterator in interface MutableIntCollectionintIterator in interface IntIterablepublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException
readExternal in interface ExternalizableIOExceptionCopyright © 2004–2022. All rights reserved.