Interface CharObjectMap<V>
- Type Parameters:
V- the value type stored in the map.
- All Superinterfaces:
java.util.Map<java.lang.Character, V>
- All Known Implementing Classes:
CharCollections.EmptyMap, CharCollections.UnmodifiableMap, CharObjectHashMap, Http2Settings
public interface CharObjectMap<V>
extends java.util.Map<java.lang.Character, V>
Interface for a primitive map that uses
chars as keys.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA primitive entry in the map, provided by the iterator fromentries()Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V> -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(char key) Indicates whether or not this map contains a value for the specified key.java.lang.Iterable<CharObjectMap.PrimitiveEntry<V>> entries()Gets an iterable to traverse over the primitive entries contained in this map.get(char key) Gets the value in the map with the specified key.Puts the given entry into the map.remove(char key) Removes the entry with the specified key.Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Method Details
-
get
Gets the value in the map with the specified key.- Parameters:
key- the key whose associated value is to be returned.- Returns:
- the value or
nullif the key was not found in the map.
-
put
-
remove
Removes the entry with the specified key.- Parameters:
key- the key for the entry to be removed from this map.- Returns:
- the previous value for the key, or
nullif there was no mapping.
-
entries
java.lang.Iterable<CharObjectMap.PrimitiveEntry<V>> entries()Gets an iterable to traverse over the primitive entries contained in this map. As an optimization, theCharObjectMap.PrimitiveEntrys returned by themay change as theinvalid reference
Iteratorprogresses. The caller should not rely oninvalid reference
IteratorCharObjectMap.PrimitiveEntrykey/value stability. -
containsKey
boolean containsKey(char key) Indicates whether or not this map contains a value for the specified key.
-