it.unimi.dsi.fastutil.objects
Class Reference2BooleanMaps.Singleton<K>
java.lang.Object
it.unimi.dsi.fastutil.objects.AbstractReference2BooleanFunction<K>
it.unimi.dsi.fastutil.objects.Reference2BooleanFunctions.Singleton<K>
it.unimi.dsi.fastutil.objects.Reference2BooleanMaps.Singleton<K>
- All Implemented Interfaces:
- Function<K,Boolean>, Reference2BooleanFunction<K>, Reference2BooleanMap<K>, Serializable, Cloneable, Map<K,Boolean>
- Direct Known Subclasses:
- Reference2BooleanSortedMaps.Singleton
- Enclosing class:
- Reference2BooleanMaps
public static class Reference2BooleanMaps.Singleton<K>
- extends Reference2BooleanFunctions.Singleton<K>
- implements Reference2BooleanMap<K>, 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<Reference2BooleanMap.Entry<K>> entries
keys
protected transient volatile ReferenceSet<K> keys
values
protected transient volatile BooleanCollection values
Reference2BooleanMaps.Singleton
protected Reference2BooleanMaps.Singleton(K key,
boolean value)
containsValue
public boolean containsValue(boolean v)
- Specified by:
containsValue in interface Reference2BooleanMap<K>
- See Also:
Map.containsValue(Object)
containsValue
public boolean containsValue(Object ov)
- Specified by:
containsValue in interface Map<K,Boolean>
putAll
public void putAll(Map<? extends K,? extends Boolean> m)
- Specified by:
putAll in interface Map<K,Boolean>
reference2BooleanEntrySet
public ObjectSet<Reference2BooleanMap.Entry<K>> reference2BooleanEntrySet()
- Description copied from interface:
Reference2BooleanMap
- 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 Reference2BooleanMap.entrySet()
so that it returns an ObjectSet
of objects of type Reference2BooleanMap.Entry (the latter makes it possible to
access keys and values with type-specific methods).
- Specified by:
reference2BooleanEntrySet in interface Reference2BooleanMap<K>
- Returns:
- a type-specific set view of the mappings contained in this map.
- See Also:
Reference2BooleanMap.entrySet()
keySet
public ReferenceSet<K> keySet()
- Description copied from interface:
Reference2BooleanMap
- 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 Reference2BooleanMap<K>- Specified by:
keySet in interface Map<K,Boolean>
- Returns:
- a set view of the keys contained in this map.
- See Also:
Map.keySet()
values
public BooleanCollection values()
- Description copied from interface:
Reference2BooleanMap
- 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 Reference2BooleanMap<K>- Specified by:
values in interface Map<K,Boolean>
- 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<K,Boolean>
entrySet
public ObjectSet<Map.Entry<K,Boolean>> entrySet()
- Description copied from interface:
Reference2BooleanMap
- 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 Reference2BooleanMap<K>- Specified by:
entrySet in interface Map<K,Boolean>
- 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<K,Boolean>- Overrides:
hashCode in class Object
equals
public boolean equals(Object o)
- Specified by:
equals in interface Map<K,Boolean>- Overrides:
equals in class Object
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2011. All Rights Reserved.