Package it.unimi.dsi.fastutil.ints
Class Int2FloatFunctions.EmptyFunction
java.lang.Object
it.unimi.dsi.fastutil.ints.AbstractInt2FloatFunction
it.unimi.dsi.fastutil.ints.Int2FloatFunctions.EmptyFunction
- All Implemented Interfaces:
it.unimi.dsi.fastutil.Function<Integer,,Float> it.unimi.dsi.fastutil.ints.Int2FloatFunction,Serializable,Cloneable,Function<Integer,,Float> IntToDoubleFunction
- Direct Known Subclasses:
Int2FloatMaps.EmptyMap
- Enclosing class:
Int2FloatFunctions
public static class Int2FloatFunctions.EmptyFunction
extends AbstractInt2FloatFunction
implements Serializable, Cloneable
An immutable class representing an empty type-specific function.
This class may be useful to implement your own in case you subclass a type-specific function.
- See Also:
-
Field Summary
Fields inherited from class it.unimi.dsi.fastutil.ints.AbstractInt2FloatFunction
defRetValue -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()clone()booleancontainsKey(int k) floatvoiddefaultReturnValue(float defRetValue) booleanfloatget(int k) floatgetOrDefault(int k, float defaultValue) inthashCode()intsize()toString()Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface it.unimi.dsi.fastutil.Function
applyMethods inherited from interface it.unimi.dsi.fastutil.ints.Int2FloatFunction
andThen, andThenByte, andThenChar, andThenDouble, andThenFloat, andThenInt, andThenLong, andThenObject, andThenReference, andThenShort, applyAsDouble, compose, composeByte, composeChar, composeDouble, composeFloat, composeInt, composeLong, composeObject, composeReference, composeShort, containsKey, get, getOrDefault, put, put, remove, remove
-
Constructor Details
-
EmptyFunction
protected EmptyFunction()
-
-
Method Details
-
get
public float get(int k) - Specified by:
getin interfaceit.unimi.dsi.fastutil.ints.Int2FloatFunction
-
getOrDefault
public float getOrDefault(int k, float defaultValue) - Specified by:
getOrDefaultin interfaceit.unimi.dsi.fastutil.ints.Int2FloatFunction
-
containsKey
public boolean containsKey(int k) - Specified by:
containsKeyin interfaceit.unimi.dsi.fastutil.ints.Int2FloatFunction
-
defaultReturnValue
public float defaultReturnValue()- Specified by:
defaultReturnValuein interfaceit.unimi.dsi.fastutil.ints.Int2FloatFunction- Overrides:
defaultReturnValuein classAbstractInt2FloatFunction
-
defaultReturnValue
public void defaultReturnValue(float defRetValue) - Specified by:
defaultReturnValuein interfaceit.unimi.dsi.fastutil.ints.Int2FloatFunction- Overrides:
defaultReturnValuein classAbstractInt2FloatFunction
-
size
public int size() -
clear
public void clear() -
clone
-
hashCode
public int hashCode() -
equals
-
toString
-