Package io.netty.util.collection
Interface ByteObjectMap<V>
-
- Type Parameters:
V- the value type stored in the map.
- All Superinterfaces:
java.util.Map<java.lang.Byte,V>
- All Known Implementing Classes:
ByteObjectHashMap
public interface ByteObjectMap<V> extends java.util.Map<java.lang.Byte,V>Interface for a primitive map that usesbytes as keys.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceByteObjectMap.PrimitiveEntry<V>A primitive entry in the map, provided by the iterator fromentries()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancontainsKey(byte key)Indicates whether or not this map contains a value for the specified key.java.lang.Iterable<ByteObjectMap.PrimitiveEntry<V>>entries()Gets an iterable to traverse over the primitive entries contained in this map.Vget(byte key)Gets the value in the map with the specified key.Vput(byte key, V value)Puts the given entry into the map.Vremove(byte key)Removes the entry with the specified key.
-
-
-
Method Detail
-
get
V get(byte key)
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
V put(byte key, V value)
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
nullif there was no previous mapping.
-
remove
V remove(byte key)
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<ByteObjectMap.PrimitiveEntry<V>> entries()
Gets an iterable to traverse over the primitive entries contained in this map. As an optimization, theByteObjectMap.PrimitiveEntrys returned by theIteratormay change as theIteratorprogresses. The caller should not rely onByteObjectMap.PrimitiveEntrykey/value stability.
-
containsKey
boolean containsKey(byte key)
Indicates whether or not this map contains a value for the specified key.
-
-