Package io.netty.util.collection
Interface ByteObjectMap<V>
- Type Parameters:
V
- the value type stored in the map.
- All Known Implementing Classes:
ByteCollections.EmptyMap
,ByteCollections.UnmodifiableMap
,ByteObjectHashMap
Interface for a primitive map that uses
byte
s as keys.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
A primitive entry in the map, provided by the iterator fromentries()
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsKey
(byte key) Indicates whether or not this map contains a value for the specified key.entries()
Gets an iterable to traverse over the primitive entries contained in this map.get
(byte key) Gets the value in the map with the specified key.Puts the given entry into the map.remove
(byte 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
null
if the key was not found in the map.
-
put
Puts the given entry into the map.- Parameters:
key
- the key of the entry.value
- the value of the entry.- Returns:
- the previous value for this key or
null
if there was no previous mapping.
-
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
null
if there was no mapping.
-
entries
Iterable<ByteObjectMap.PrimitiveEntry<V>> entries()Gets an iterable to traverse over the primitive entries contained in this map. As an optimization, theByteObjectMap.PrimitiveEntry
s returned by theinvalid reference
Iterator
invalid reference
Iterator
ByteObjectMap.PrimitiveEntry
key/value stability. -
containsKey
boolean containsKey(byte key) Indicates whether or not this map contains a value for the specified key.
-