public class FloatHashBag extends AbstractFloatIterable implements MutableFloatBag, Externalizable
HashBag, and is memory-optimized for float primitives.
This file was automatically generated from template file primitiveHashBag.stg.| Constructor and Description |
|---|
FloatHashBag() |
FloatHashBag(float... elements) |
FloatHashBag(FloatHashBag bag) |
FloatHashBag(FloatIterable iterable) |
FloatHashBag(int size) |
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 FloatHashBag()
public FloatHashBag(int size)
public FloatHashBag(FloatIterable iterable)
public FloatHashBag(float... elements)
public FloatHashBag(FloatHashBag bag)
public static FloatHashBag newBag(int size)
public static FloatHashBag newBagWith(float... source)
public static FloatHashBag newBag(FloatIterable source)
public static FloatHashBag newBag(FloatBag 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 FloatBagpublic void clear()
clear in interface MutableFloatCollectionpublic FloatHashBag with(float element)
with in interface MutableFloatBagwith in interface MutableFloatCollectionpublic FloatHashBag with(float element1, float element2)
public FloatHashBag with(float element1, float element2, float element3)
public FloatHashBag withAll(FloatIterable iterable)
withAll in interface MutableFloatBagwithAll in interface MutableFloatCollectionpublic FloatHashBag without(float element)
without in interface MutableFloatBagwithout in interface MutableFloatCollectionpublic FloatHashBag withoutAll(FloatIterable iterable)
withoutAll in interface MutableFloatBagwithoutAll in interface MutableFloatCollectionpublic boolean contains(float value)
contains in interface FloatIterablepublic int occurrencesOf(float item)
occurrencesOf in interface FloatBagpublic void forEachWithOccurrences(FloatIntProcedure procedure)
forEachWithOccurrences in interface FloatBagpublic FloatHashBag selectByOccurrences(IntPredicate predicate)
selectByOccurrences in interface FloatBagselectByOccurrences in interface MutableFloatBagpublic MutableFloatSet selectUnique()
selectUnique in interface FloatBagselectUnique in interface MutableFloatBagpublic MutableList<FloatIntPair> topOccurrences(int count)
topOccurrences in interface FloatBagtopOccurrences in interface MutableFloatBagpublic MutableList<FloatIntPair> bottomOccurrences(int count)
bottomOccurrences in interface FloatBagbottomOccurrences in interface MutableFloatBagpublic boolean add(float item)
add in interface MutableFloatCollectionpublic boolean remove(float item)
remove in interface MutableFloatCollectionpublic boolean removeIf(FloatPredicate predicate)
removeIf in interface MutableFloatCollectionpublic boolean addAll(float... source)
addAll in interface MutableFloatCollectionpublic boolean addAll(FloatIterable source)
addAll in interface MutableFloatCollectionpublic boolean removeAll(float... source)
removeAll in interface MutableFloatCollectionpublic boolean removeAll(FloatIterable source)
removeAll in interface MutableFloatCollectionpublic boolean retainAll(FloatIterable source)
retainAll in interface MutableFloatCollectionpublic boolean retainAll(float... source)
retainAll in interface MutableFloatCollectionpublic void addOccurrences(float item,
int occurrences)
addOccurrences in interface MutableFloatBagpublic boolean removeOccurrences(float item,
int occurrences)
removeOccurrences in interface MutableFloatBagpublic void each(FloatProcedure procedure)
each in interface FloatIterablepublic FloatHashBag select(FloatPredicate predicate)
select in interface FloatBagselect in interface MutableFloatBagselect in interface MutableFloatCollectionselect in interface FloatIterablepublic FloatHashBag reject(FloatPredicate predicate)
reject in interface FloatBagreject in interface MutableFloatBagreject in interface MutableFloatCollectionreject in interface FloatIterablepublic <T> T injectInto(T injectedValue,
ObjectFloatToObjectFunction<? super T,? extends T> function)
injectInto in interface FloatIterablepublic RichIterable<FloatIterable> chunk(int size)
chunk in interface FloatIterablepublic boolean equals(Object otherBag)
public int hashCode()
public void appendString(Appendable appendable, String start, String separator, String end)
appendString in interface PrimitiveIterablepublic int count(FloatPredicate predicate)
count in interface FloatIterablepublic boolean anySatisfy(FloatPredicate predicate)
anySatisfy in interface FloatIterablepublic boolean allSatisfy(FloatPredicate predicate)
allSatisfy in interface FloatIterablepublic boolean noneSatisfy(FloatPredicate predicate)
noneSatisfy in interface FloatIterablepublic float detectIfNone(FloatPredicate predicate, float ifNone)
detectIfNone in interface FloatIterablepublic <V> MutableBag<V> collect(FloatToObjectFunction<? extends V> function)
collect in interface FloatBagcollect in interface MutableFloatBagcollect in interface MutableFloatCollectioncollect in interface FloatIterablepublic float max()
max in interface FloatIterablepublic float min()
min in interface FloatIterablepublic double sum()
sum in interface FloatIterablepublic float[] toArray()
toArray in interface FloatIterablepublic float[] toArray(float[] array)
toArray in interface FloatIterablepublic MutableFloatBag asUnmodifiable()
asUnmodifiable in interface MutableFloatBagasUnmodifiable in interface MutableFloatCollectionpublic MutableFloatBag asSynchronized()
asSynchronized in interface MutableFloatBagasSynchronized in interface MutableFloatCollectionpublic ImmutableFloatBag toImmutable()
toImmutable in interface FloatBagtoImmutable in interface MutableFloatBagtoImmutable in interface MutableFloatCollectionpublic FloatHashBag newEmpty()
newEmpty in interface MutableFloatBagnewEmpty in interface MutableFloatCollectionpublic MutableFloatIterator floatIterator()
floatIterator in interface MutableFloatCollectionfloatIterator in interface FloatIterablepublic 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.