Class AbstractMutableFloatValuesMap
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractFloatIterable
org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableFloatValuesMap
- All Implemented Interfaces:
FloatIterable, FloatValuesMap, MutableFloatValuesMap, PrimitiveIterable
- Direct Known Subclasses:
ByteFloatHashMap, CharFloatHashMap, DoubleFloatHashMap, FloatFloatHashMap, IntFloatHashMap, LongFloatHashMap, ShortFloatHashMap
public abstract class AbstractMutableFloatValuesMap
extends AbstractFloatIterable
implements MutableFloatValuesMap
This file was automatically generated from template file abstractMutablePrimitiveValuesMap.stg.
- Since:
- 6.0.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classprotected static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddEmptyKeyValue(float value) protected voidaddRemovedKeyValue(float value) booleanallSatisfy(FloatPredicate predicate) Returns true if all of the elements in the FloatIterable return true for the specified predicate, otherwise returns false.booleananySatisfy(FloatPredicate predicate) Returns true if any of the elements in the FloatIterable return true for the specified predicate, otherwise returns false.voidappendString(Appendable appendable, String start, String separator, String end) Prints a string representation of this collection onto the givenAppendable.chunk(int size) Partitions elements in fixed size chunks.<V> MutableBag<V> collect(FloatToObjectFunction<? extends V> function) Returns a new collection with the results of applying the specified function on each element of the source collection.booleancontains(float value) Returns true if the value is contained in the FloatIterable, and false if it is not.booleancontainsAll(FloatIterable source) Returns true if all of the values specified in the source FloatIterable are contained in the FloatIterable, and false if they are not.booleancontainsValue(float value) Returns whether or not this map contains the value.intcount(FloatPredicate predicate) Returns a count of the number of elements in the FloatIterable that return true for the specified predicate.floatdetectIfNone(FloatPredicate predicate, float value) voideach(FloatProcedure procedure) A synonym for forEach.voidforEachValue(FloatProcedure procedure) Iterates through each value in this map.protected abstract floatprotected abstract intprotected abstract AbstractMutableFloatValuesMap.SentinelValuesprotected abstract intprotected abstract floatgetValueAtIndex(int index) booleanisEmpty()Returns true if this iterable has zero items.protected abstract booleanisNonSentinelAtIndex(int index) floatmax()floatmin()booleannotEmpty()The English equivalent of !this.isEmpty()reject(FloatPredicate predicate) Returns a new FloatIterable with all of the elements in the FloatIterable that return false for the specified predicate.protected voidprotected voidselect(FloatPredicate predicate) Returns a new FloatIterable with all of the elements in the FloatIterable that return true for the specified predicate.protected abstract voidintsize()Returns the number of items in this iterable.doublesum()float[]toArray()Converts the FloatIterable to a primitive float array.float[]toArray(float[] target) Converts the FloatIterable to a primitive float array.Methods inherited from class AbstractFloatIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface FloatIterable
asLazy, average, averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectInto, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, maxIfEmpty, median, medianIfEmpty, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListByMethods inherited from interface FloatValuesMap
tap, valuesMethods inherited from interface MutableFloatValuesMap
clear, floatIteratorMethods inherited from interface PrimitiveIterable
appendString, appendString, makeString, makeString, makeString, toString
-
Constructor Details
-
AbstractMutableFloatValuesMap
public AbstractMutableFloatValuesMap()
-
-
Method Details
-
getOccupiedWithData
protected abstract int getOccupiedWithData() -
getSentinelValues
-
setSentinelValuesNull
protected abstract void setSentinelValuesNull() -
getEmptyValue
protected abstract float getEmptyValue() -
getValueAtIndex
protected abstract float getValueAtIndex(int index) -
getTableSize
protected abstract int getTableSize() -
isNonSentinelAtIndex
protected abstract boolean isNonSentinelAtIndex(int index) -
addEmptyKeyValue
protected void addEmptyKeyValue(float value) -
removeEmptyKey
protected void removeEmptyKey() -
addRemovedKeyValue
protected void addRemovedKeyValue(float value) -
removeRemovedKey
protected void removeRemovedKey() -
contains
public boolean contains(float value) Description copied from interface:FloatIterableReturns true if the value is contained in the FloatIterable, and false if it is not.- Specified by:
containsin interfaceFloatIterable
-
containsAll
Description copied from interface:FloatIterableReturns true if all of the values specified in the source FloatIterable are contained in the FloatIterable, and false if they are not.- Specified by:
containsAllin interfaceFloatIterable
-
max
public float max()- Specified by:
maxin interfaceFloatIterable
-
min
public float min()- Specified by:
minin interfaceFloatIterable
-
size
public int size()Description copied from interface:PrimitiveIterableReturns the number of items in this iterable.- Specified by:
sizein interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()Description copied from interface:PrimitiveIterableReturns true if this iterable has zero items.- Specified by:
isEmptyin interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()Description copied from interface:PrimitiveIterableThe English equivalent of !this.isEmpty()- Specified by:
notEmptyin interfacePrimitiveIterable
-
each
Description copied from interface:FloatIterableA synonym for forEach.- Specified by:
eachin interfaceFloatIterable- Since:
- 7.0.
-
appendString
Description copied from interface:PrimitiveIterablePrints a string representation of this collection onto the givenAppendable. Prints the string returned byPrimitiveIterable.makeString(String, String, String).- Specified by:
appendStringin interfacePrimitiveIterable
-
toArray
public float[] toArray()Description copied from interface:FloatIterableConverts the FloatIterable to a primitive float array.- Specified by:
toArrayin interfaceFloatIterable
-
toArray
public float[] toArray(float[] target) Description copied from interface:FloatIterableConverts the FloatIterable to a primitive float array. If the collection fits into the provided array it is used to store its elements and is returned from the method, otherwise a new array of the appropriate size is allocated and returned. If the iterable is empty, the target array is returned unchanged.- Specified by:
toArrayin interfaceFloatIterable
-
select
Description copied from interface:FloatIterableReturns a new FloatIterable with all of the elements in the FloatIterable that return true for the specified predicate.- Specified by:
selectin interfaceFloatIterable- Specified by:
selectin interfaceFloatValuesMap- Specified by:
selectin interfaceMutableFloatValuesMap
-
reject
Description copied from interface:FloatIterableReturns a new FloatIterable with all of the elements in the FloatIterable that return false for the specified predicate.- Specified by:
rejectin interfaceFloatIterable- Specified by:
rejectin interfaceFloatValuesMap- Specified by:
rejectin interfaceMutableFloatValuesMap
-
collect
Description copied from interface:FloatIterableReturns a new collection with the results of applying the specified function on each element of the source collection. This method is also commonly called transform or map.- Specified by:
collectin interfaceFloatIterable- Specified by:
collectin interfaceFloatValuesMap- Specified by:
collectin interfaceMutableFloatValuesMap
-
detectIfNone
- Specified by:
detectIfNonein interfaceFloatIterable
-
count
Description copied from interface:FloatIterableReturns a count of the number of elements in the FloatIterable that return true for the specified predicate.- Specified by:
countin interfaceFloatIterable
-
anySatisfy
Description copied from interface:FloatIterableReturns true if any of the elements in the FloatIterable return true for the specified predicate, otherwise returns false.- Specified by:
anySatisfyin interfaceFloatIterable
-
allSatisfy
Description copied from interface:FloatIterableReturns true if all of the elements in the FloatIterable return true for the specified predicate, otherwise returns false.- Specified by:
allSatisfyin interfaceFloatIterable
-
chunk
Description copied from interface:FloatIterablePartitions elements in fixed size chunks.- Specified by:
chunkin interfaceFloatIterable- Parameters:
size- the number of elements per chunk- Returns:
- A
RichIterablecontainingFloatIterables of sizesize, except the last will be truncated if the elements don't divide evenly.
-
sum
public double sum()- Specified by:
sumin interfaceFloatIterable
-
containsValue
public boolean containsValue(float value) Description copied from interface:FloatValuesMapReturns whether or not this map contains the value.- Specified by:
containsValuein interfaceFloatValuesMap- Parameters:
value- the value to test- Returns:
- if this collection contains the value
-
forEachValue
Description copied from interface:FloatValuesMapIterates through each value in this map.- Specified by:
forEachValuein interfaceFloatValuesMap- Parameters:
procedure- the procedure to invoke for each value in this map.
-