Interface Char2ObjectMap<V>
-
- All Superinterfaces:
Char2ObjectFunction<V>,Function<Character,V>,Map<Character,V>
- All Known Implementing Classes:
AbstractChar2ObjectMap,Char2ObjectOpenHashMap
public interface Char2ObjectMap<V> extends Char2ObjectFunction<V>, Map<Character,V>
A type-specificMap; provides some additional methods that use polymorphism to avoid (un)boxing, and handling of a default return value.Besides extending the corresponding type-specific function, this interface strengthens
entrySet(),keySet()andvalues(). Maps returning entry sets of typeChar2ObjectMap.FastEntrySetsupport also fast iteration.A submap or subset may or may not have an independent default return value (which however must be initialized to the default return value of the originator).
- See Also:
Map
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceChar2ObjectMap.Entry<V>A type-specificMap.Entry; provides some additional methods that use polymorphism to avoid (un)boxing.static interfaceChar2ObjectMap.FastEntrySet<V>An entry set providing fast iteration.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ObjectSet<Char2ObjectMap.Entry<V>>char2ObjectEntrySet()Returns a type-specific set view of the mappings contained in this map.ObjectSet<Map.Entry<Character,V>>entrySet()Returns a set view of the mappings contained in this map.CharSetkeySet()Returns a set view of the keys contained in this map.ObjectCollection<V>values()Returns a set view of the values contained in this map.-
Methods inherited from interface org.codelibs.jhighlight.fastutil.chars.Char2ObjectFunction
containsKey, defaultReturnValue, defaultReturnValue, get, put, remove
-
Methods inherited from interface org.codelibs.jhighlight.fastutil.Function
clear, containsKey, get, put, remove, size
-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, forEach, get, getOrDefault, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size
-
-
-
-
Method Detail
-
entrySet
ObjectSet<Map.Entry<Character,V>> entrySet()
Returns a set view of the mappings contained in this map.Note that this specification strengthens the one given in
Map.entrySet().- Specified by:
entrySetin interfaceMap<Character,V>- Returns:
- a set view of the mappings contained in this map.
- See Also:
Map.entrySet()
-
char2ObjectEntrySet
ObjectSet<Char2ObjectMap.Entry<V>> char2ObjectEntrySet()
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
entrySet()so that it returns anObjectSetof objects of typeMap.Entry(the latter makes it possible to access keys and values with type-specific methods).- Returns:
- a type-specific set view of the mappings contained in this map.
- See Also:
entrySet()
-
keySet
CharSet keySet()
Returns a set view of the keys contained in this map.Note that this specification strengthens the one given in
Map.keySet().- Specified by:
keySetin interfaceMap<Character,V>- Returns:
- a set view of the keys contained in this map.
- See Also:
Map.keySet()
-
values
ObjectCollection<V> values()
Returns a set view of the values contained in this map.Note that this specification strengthens the one given in
Map.values().- Specified by:
valuesin interfaceMap<Character,V>- Returns:
- a set view of the values contained in this map.
- See Also:
Map.values()
-
-