it.unimi.dsi.fastutil.floats
Class Float2LongMaps.Singleton
java.lang.Object
it.unimi.dsi.fastutil.floats.AbstractFloat2LongFunction
it.unimi.dsi.fastutil.floats.Float2LongFunctions.Singleton
it.unimi.dsi.fastutil.floats.Float2LongMaps.Singleton
- All Implemented Interfaces:
- Float2LongFunction, Float2LongMap, Function<Float,Long>, Serializable, Cloneable, Map<Float,Long>
- Direct Known Subclasses:
- Float2LongSortedMaps.Singleton
- Enclosing class:
- Float2LongMaps
public static class Float2LongMaps.Singleton
- extends Float2LongFunctions.Singleton
- implements Float2LongMap, 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
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
entries
protected transient volatile ObjectSet<Float2LongMap.Entry> entries
keys
protected transient volatile FloatSet keys
values
protected transient volatile LongCollection values
Float2LongMaps.Singleton
protected Float2LongMaps.Singleton(float key,
long value)
containsValue
public boolean containsValue(long v)
- Specified by:
containsValue
in interface Float2LongMap
- See Also:
Map.containsValue(Object)
containsValue
public boolean containsValue(Object ov)
- Specified by:
containsValue
in interface Map<Float,Long>
putAll
public void putAll(Map<? extends Float,? extends Long> m)
- Specified by:
putAll
in interface Map<Float,Long>
float2LongEntrySet
public ObjectSet<Float2LongMap.Entry> float2LongEntrySet()
- Description copied from interface:
Float2LongMap
- 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 Float2LongMap.entrySet()
so that it returns an ObjectSet
of objects of type Float2LongMap.Entry
(the latter makes it possible to
access keys and values with type-specific methods).
- Specified by:
float2LongEntrySet
in interface Float2LongMap
- Returns:
- a type-specific set view of the mappings contained in this map.
- See Also:
Float2LongMap.entrySet()
keySet
public FloatSet keySet()
- Description copied from interface:
Float2LongMap
- Returns a set view of the keys contained in this map.
Note that this specification strengthens the one given in Map.keySet()
.
- Specified by:
keySet
in interface Float2LongMap
- Specified by:
keySet
in interface Map<Float,Long>
- Returns:
- a set view of the keys contained in this map.
- See Also:
Map.keySet()
values
public LongCollection values()
- Description copied from interface:
Float2LongMap
- Returns a set view of the values contained in this map.
Note that this specification strengthens the one given in Map.values()
.
- Specified by:
values
in interface Float2LongMap
- Specified by:
values
in interface Map<Float,Long>
- Returns:
- a set view of the values contained in this map.
- See Also:
Map.values()
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface Map<Float,Long>
entrySet
public ObjectSet<Map.Entry<Float,Long>> entrySet()
- Description copied from interface:
Float2LongMap
- 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 interface Float2LongMap
- Specified by:
entrySet
in interface Map<Float,Long>
- Returns:
- a set view of the mappings contained in this map.
- See Also:
Map.entrySet()
hashCode
public int hashCode()
- Specified by:
hashCode
in interface Map<Float,Long>
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object o)
- Specified by:
equals
in interface Map<Float,Long>
- Overrides:
equals
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2011. All Rights Reserved.