Class FloatHashBag
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractFloatIterable
org.eclipse.collections.impl.bag.mutable.primitive.FloatHashBag
- All Implemented Interfaces:
Externalizable,Serializable,FloatBag,MutableFloatBag,MutableFloatCollection,FloatIterable,PrimitiveIterable
FloatHashBag is similar to
HashBag, and is memory-optimized for float primitives.
This file was automatically generated from template file primitiveHashBag.stg.- Since:
- 3.0.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFloatHashBag(float... elements) FloatHashBag(int size) FloatHashBag(FloatIterable iterable) FloatHashBag(FloatHashBag bag) -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(float item) booleanaddAll(float... source) booleanaddAll(FloatIterable source) voidaddOccurrences(float item, int occurrences) booleanallSatisfy(FloatPredicate predicate) booleananySatisfy(FloatPredicate predicate) voidappendString(Appendable appendable, String start, String separator, String end) bottomOccurrences(int count) chunk(int size) voidclear()<V> MutableBag<V>collect(FloatToObjectFunction<? extends V> function) booleancontains(float value) intcount(FloatPredicate predicate) floatdetectIfNone(FloatPredicate predicate, float ifNone) voideach(FloatProcedure procedure) booleanvoidforEachWithOccurrences(FloatIntProcedure procedure) inthashCode()<T> TinjectInto(T injectedValue, ObjectFloatToObjectFunction<? super T, ? extends T> function) booleanisEmpty()floatmax()floatmin()static FloatHashBagnewBag(int size) static FloatHashBagstatic FloatHashBagnewBag(FloatIterable source) static FloatHashBagnewBagWith(float... source) newEmpty()Creates a new empty FloatHashBag.booleannoneSatisfy(FloatPredicate predicate) booleannotEmpty()intoccurrencesOf(float item) voidreject(FloatPredicate predicate) booleanremove(float item) booleanremoveAll(float... source) booleanremoveAll(FloatIterable source) booleanremoveIf(FloatPredicate predicate) booleanremoveOccurrences(float item, int occurrences) booleanretainAll(float... source) booleanretainAll(FloatIterable source) select(FloatPredicate predicate) selectByOccurrences(IntPredicate predicate) intsize()intdoublesum()float[]toArray()float[]toArray(float[] array) topOccurrences(int count) with(float element) with(float element1, float element2) with(float element1, float element2, float element3) withAll(FloatIterable iterable) without(float element) withoutAll(FloatIterable iterable) voidMethods inherited from class org.eclipse.collections.impl.primitive.AbstractFloatIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringMethods inherited from interface org.eclipse.collections.api.bag.primitive.FloatBag
toStringOfItemToCountMethods inherited from interface org.eclipse.collections.api.FloatIterable
asLazy, 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, toSortedListByMethods inherited from interface org.eclipse.collections.api.bag.primitive.MutableFloatBag
selectDuplicates, tapMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, makeString, makeString, makeString, toString
-
Constructor Details
-
FloatHashBag
public FloatHashBag() -
FloatHashBag
public FloatHashBag(int size) -
FloatHashBag
-
FloatHashBag
public FloatHashBag(float... elements) -
FloatHashBag
-
-
Method Details
-
newBag
-
newBagWith
-
newBag
-
newBag
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()- Specified by:
notEmptyin interfacePrimitiveIterable
-
size
public int size()- Specified by:
sizein interfacePrimitiveIterable
-
sizeDistinct
public int sizeDistinct()- Specified by:
sizeDistinctin interfaceFloatBag
-
clear
public void clear()- Specified by:
clearin interfaceMutableFloatCollection
-
with
- Specified by:
within interfaceMutableFloatBag- Specified by:
within interfaceMutableFloatCollection
-
with
-
with
-
withAll
- Specified by:
withAllin interfaceMutableFloatBag- Specified by:
withAllin interfaceMutableFloatCollection
-
without
- Specified by:
withoutin interfaceMutableFloatBag- Specified by:
withoutin interfaceMutableFloatCollection
-
withoutAll
- Specified by:
withoutAllin interfaceMutableFloatBag- Specified by:
withoutAllin interfaceMutableFloatCollection
-
contains
public boolean contains(float value) - Specified by:
containsin interfaceFloatIterable
-
occurrencesOf
public int occurrencesOf(float item) - Specified by:
occurrencesOfin interfaceFloatBag
-
forEachWithOccurrences
- Specified by:
forEachWithOccurrencesin interfaceFloatBag
-
selectByOccurrences
- Specified by:
selectByOccurrencesin interfaceFloatBag- Specified by:
selectByOccurrencesin interfaceMutableFloatBag
-
selectUnique
- Specified by:
selectUniquein interfaceFloatBag- Specified by:
selectUniquein interfaceMutableFloatBag
-
topOccurrences
- Specified by:
topOccurrencesin interfaceFloatBag- Specified by:
topOccurrencesin interfaceMutableFloatBag
-
bottomOccurrences
- Specified by:
bottomOccurrencesin interfaceFloatBag- Specified by:
bottomOccurrencesin interfaceMutableFloatBag
-
add
public boolean add(float item) - Specified by:
addin interfaceMutableFloatCollection
-
remove
public boolean remove(float item) - Specified by:
removein interfaceMutableFloatCollection
-
removeIf
- Specified by:
removeIfin interfaceMutableFloatCollection
-
addAll
public boolean addAll(float... source) - Specified by:
addAllin interfaceMutableFloatCollection
-
addAll
- Specified by:
addAllin interfaceMutableFloatCollection
-
removeAll
public boolean removeAll(float... source) - Specified by:
removeAllin interfaceMutableFloatCollection
-
removeAll
- Specified by:
removeAllin interfaceMutableFloatCollection
-
retainAll
- Specified by:
retainAllin interfaceMutableFloatCollection
-
retainAll
public boolean retainAll(float... source) - Specified by:
retainAllin interfaceMutableFloatCollection
-
addOccurrences
public void addOccurrences(float item, int occurrences) - Specified by:
addOccurrencesin interfaceMutableFloatBag
-
removeOccurrences
public boolean removeOccurrences(float item, int occurrences) - Specified by:
removeOccurrencesin interfaceMutableFloatBag
-
each
- Specified by:
eachin interfaceFloatIterable- Since:
- 7.0.
-
select
- Specified by:
selectin interfaceFloatBag- Specified by:
selectin interfaceFloatIterable- Specified by:
selectin interfaceMutableFloatBag- Specified by:
selectin interfaceMutableFloatCollection
-
reject
- Specified by:
rejectin interfaceFloatBag- Specified by:
rejectin interfaceFloatIterable- Specified by:
rejectin interfaceMutableFloatBag- Specified by:
rejectin interfaceMutableFloatCollection
-
injectInto
public <T> T injectInto(T injectedValue, ObjectFloatToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoin interfaceFloatIterable
-
chunk
- Specified by:
chunkin interfaceFloatIterable
-
equals
-
hashCode
public int hashCode() -
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
count
- Specified by:
countin interfaceFloatIterable
-
anySatisfy
- Specified by:
anySatisfyin interfaceFloatIterable
-
allSatisfy
- Specified by:
allSatisfyin interfaceFloatIterable
-
noneSatisfy
- Specified by:
noneSatisfyin interfaceFloatIterable
-
detectIfNone
- Specified by:
detectIfNonein interfaceFloatIterable
-
collect
- Specified by:
collectin interfaceFloatBag- Specified by:
collectin interfaceFloatIterable- Specified by:
collectin interfaceMutableFloatBag- Specified by:
collectin interfaceMutableFloatCollection
-
max
public float max()- Specified by:
maxin interfaceFloatIterable
-
min
public float min()- Specified by:
minin interfaceFloatIterable
-
sum
public double sum()- Specified by:
sumin interfaceFloatIterable
-
toArray
public float[] toArray()- Specified by:
toArrayin interfaceFloatIterable
-
toArray
public float[] toArray(float[] array) - Specified by:
toArrayin interfaceFloatIterable
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableFloatBag- Specified by:
asUnmodifiablein interfaceMutableFloatCollection
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableFloatBag- Specified by:
asSynchronizedin interfaceMutableFloatCollection
-
toImmutable
- Specified by:
toImmutablein interfaceFloatBag- Specified by:
toImmutablein interfaceMutableFloatBag- Specified by:
toImmutablein interfaceMutableFloatCollection
-
newEmpty
Creates a new empty FloatHashBag.- Specified by:
newEmptyin interfaceMutableFloatBag- Specified by:
newEmptyin interfaceMutableFloatCollection- Since:
- 9.2.
-
floatIterator
- Specified by:
floatIteratorin interfaceFloatIterable- Specified by:
floatIteratorin interfaceMutableFloatCollection
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException
-