Package it.unimi.dsi.fastutil.shorts
Class Short2DoubleMaps.Singleton
java.lang.Object
it.unimi.dsi.fastutil.shorts.AbstractShort2DoubleFunction
it.unimi.dsi.fastutil.shorts.Short2DoubleFunctions.Singleton
it.unimi.dsi.fastutil.shorts.Short2DoubleMaps.Singleton
- All Implemented Interfaces:
Function<Short,Double>
,Short2DoubleFunction
,Short2DoubleMap
,Serializable
,Cloneable
,Function<Short,Double>
,IntToDoubleFunction
,Map<Short,Double>
- Direct Known Subclasses:
Short2DoubleSortedMaps.Singleton
- Enclosing class:
- Short2DoubleMaps
public static class Short2DoubleMaps.Singleton extends Short2DoubleFunctions.Singleton implements Short2DoubleMap, Serializable, Cloneable
An immutable class representing a type-specific singleton map.
This class may be useful to implement your own in case you subclass a type-specific map.
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from interface it.unimi.dsi.fastutil.shorts.Short2DoubleMap
Short2DoubleMap.Entry, Short2DoubleMap.FastEntrySet
-
Method Summary
Modifier and Type Method Description boolean
containsValue(double v)
Returnstrue
if this map maps one or more keys to the specified value.boolean
containsValue(Object ov)
Deprecated.Please use the corresponding type-specific method instead.ObjectSet<Map.Entry<Short,Double>>
entrySet()
Deprecated.Please use the corresponding type-specific method instead.boolean
equals(Object o)
int
hashCode()
boolean
isEmpty()
ShortSet
keySet()
void
putAll(Map<? extends Short,? extends Double> m)
ObjectSet<Short2DoubleMap.Entry>
short2DoubleEntrySet()
Returns a type-specific set view of the mappings contained in this map.String
toString()
DoubleCollection
values()
Methods inherited from class it.unimi.dsi.fastutil.shorts.Short2DoubleFunctions.Singleton
clone, containsKey, get, size
Methods inherited from class it.unimi.dsi.fastutil.shorts.AbstractShort2DoubleFunction
defaultReturnValue, defaultReturnValue
Methods inherited from interface java.util.Map
forEach, replaceAll
Methods inherited from interface it.unimi.dsi.fastutil.shorts.Short2DoubleFunction
andThen, andThen, andThen, andThen, andThen, andThen, andThen, andThen, andThen, applyAsDouble, compose, compose, compose, compose, compose, compose, compose, compose, compose, get, put, remove
Methods inherited from interface it.unimi.dsi.fastutil.shorts.Short2DoubleMap
clear, compute, compute, computeIfAbsent, computeIfAbsent, computeIfAbsentNullable, computeIfAbsentPartial, computeIfPresent, computeIfPresent, containsKey, containsKey, defaultReturnValue, defaultReturnValue, get, getOrDefault, getOrDefault, merge, merge, put, putIfAbsent, putIfAbsent, remove, remove, remove, replace, replace, replace, replace, size
-
Method Details
-
containsValue
public boolean containsValue(double v)Description copied from interface:Short2DoubleMap
Returnstrue
if this map maps one or more keys to the specified value.- Specified by:
containsValue
in interfaceShort2DoubleMap
- See Also:
Map.containsValue(Object)
-
containsValue
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
containsValue
in interfaceMap<Short,Double>
- Specified by:
containsValue
in interfaceShort2DoubleMap
-
putAll
-
short2DoubleEntrySet
Description copied from interface:Short2DoubleMap
Returns a type-specific set view of the mappings contained in this map.This method is necessary because there is no inheritance along type parameters: it is thus impossible to strengthen
Map.entrySet()
so that it returns anObjectSet
of type-specific entries (the latter makes it possible to access keys and values with type-specific methods).- Specified by:
short2DoubleEntrySet
in interfaceShort2DoubleMap
- Returns:
- a type-specific set view of the mappings contained in this map.
- See Also:
Map.entrySet()
-
entrySet
Deprecated.Please use the corresponding type-specific method instead.Returns a set view of the mappings contained in this map.Note that this specification strengthens the one given in
Map.entrySet()
.- Specified by:
entrySet
in interfaceMap<Short,Double>
- Specified by:
entrySet
in interfaceShort2DoubleMap
- Returns:
- a set view of the mappings contained in this map.
- See Also:
Map.entrySet()
-
keySet
Description copied from interface:Short2DoubleMap
Note that this specification strengthens the one given in
Map.keySet()
.- Specified by:
keySet
in interfaceMap<Short,Double>
- Specified by:
keySet
in interfaceShort2DoubleMap
- Returns:
- a set view of the keys contained in this map.
- See Also:
Map.keySet()
-
values
Description copied from interface:Short2DoubleMap
Note that this specification strengthens the one given in
Map.values()
.- Specified by:
values
in interfaceMap<Short,Double>
- Specified by:
values
in interfaceShort2DoubleMap
- Returns:
- a set view of the values contained in this map.
- See Also:
Map.values()
-
isEmpty
public boolean isEmpty() -
hashCode
public int hashCode() -
equals
-
toString
-