it.unimi.dsi.fastutil.chars
Class Char2FloatMaps.Singleton

java.lang.Object
  extended by it.unimi.dsi.fastutil.chars.AbstractChar2FloatFunction
      extended by it.unimi.dsi.fastutil.chars.Char2FloatFunctions.Singleton
          extended by it.unimi.dsi.fastutil.chars.Char2FloatMaps.Singleton
All Implemented Interfaces:
Char2FloatFunction, Char2FloatMap, Function<java.lang.Character,java.lang.Float>, java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Character,java.lang.Float>
Direct Known Subclasses:
Char2FloatSortedMaps.Singleton
Enclosing class:
Char2FloatMaps

public static class Char2FloatMaps.Singleton
extends Char2FloatFunctions.Singleton
implements Char2FloatMap, java.io.Serializable, java.lang.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.chars.Char2FloatMap
Char2FloatMap.Entry, Char2FloatMap.FastEntrySet
 
Method Summary
 ObjectSet<Char2FloatMap.Entry> char2FloatEntrySet()
          Returns a type-specific set view of the mappings contained in this map.
 boolean containsValue(float v)
           
 boolean containsValue(java.lang.Object ov)
           
 ObjectSet<java.util.Map.Entry<java.lang.Character,java.lang.Float>> entrySet()
          Returns a set view of the mappings contained in this map.
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 boolean isEmpty()
           
 CharSet keySet()
          Returns a set view of the keys contained in this map.
 void putAll(java.util.Map<? extends java.lang.Character,? extends java.lang.Float> m)
           
 java.lang.String toString()
           
 FloatCollection values()
          Returns a set view of the values contained in this map.
 
Methods inherited from class it.unimi.dsi.fastutil.chars.Char2FloatFunctions.Singleton
clone, containsKey, get, size
 
Methods inherited from class it.unimi.dsi.fastutil.chars.AbstractChar2FloatFunction
clear, containsKey, defaultReturnValue, defaultReturnValue, get, put, put, remove, remove
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface it.unimi.dsi.fastutil.chars.Char2FloatFunction
containsKey, defaultReturnValue, defaultReturnValue, get, put, remove
 
Methods inherited from interface it.unimi.dsi.fastutil.Function
clear, containsKey, get, put, remove, size
 
Methods inherited from interface java.util.Map
clear, containsKey, get, put, remove, size
 

Method Detail

containsValue

public boolean containsValue(float v)
Specified by:
containsValue in interface Char2FloatMap
See Also:
Map.containsValue(Object)

containsValue

public boolean containsValue(java.lang.Object ov)
Specified by:
containsValue in interface java.util.Map<java.lang.Character,java.lang.Float>

putAll

public void putAll(java.util.Map<? extends java.lang.Character,? extends java.lang.Float> m)
Specified by:
putAll in interface java.util.Map<java.lang.Character,java.lang.Float>

char2FloatEntrySet

public ObjectSet<Char2FloatMap.Entry> char2FloatEntrySet()
Description copied from interface: Char2FloatMap
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 Char2FloatMap.entrySet() so that it returns an ObjectSet of objects of type Map.Entry (the latter makes it possible to access keys and values with type-specific methods).

Specified by:
char2FloatEntrySet in interface Char2FloatMap
Returns:
a type-specific set view of the mappings contained in this map.
See Also:
Char2FloatMap.entrySet()

keySet

public CharSet keySet()
Description copied from interface: Char2FloatMap
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 Char2FloatMap
Specified by:
keySet in interface java.util.Map<java.lang.Character,java.lang.Float>
Returns:
a set view of the keys contained in this map.
See Also:
Map.keySet()

values

public FloatCollection values()
Description copied from interface: Char2FloatMap
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 Char2FloatMap
Specified by:
values in interface java.util.Map<java.lang.Character,java.lang.Float>
Returns:
a set view of the values contained in this map.
See Also:
Map.values()

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Map<java.lang.Character,java.lang.Float>

entrySet

public ObjectSet<java.util.Map.Entry<java.lang.Character,java.lang.Float>> entrySet()
Description copied from interface: Char2FloatMap
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 Char2FloatMap
Specified by:
entrySet in interface java.util.Map<java.lang.Character,java.lang.Float>
Returns:
a set view of the mappings contained in this map.
See Also:
Map.entrySet()

hashCode

public int hashCode()
Specified by:
hashCode in interface java.util.Map<java.lang.Character,java.lang.Float>
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface java.util.Map<java.lang.Character,java.lang.Float>
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object