Class YLongToByteMap


  • public class YLongToByteMap
    extends java.lang.Object
    Map which maps key of primitive type long to value of primitive type byte.
    • Constructor Summary

      Constructors 
      Constructor Description
      YLongToByteMap()
      Creates an empty map.
      YLongToByteMap​(int initialCapacity)
      Creates an empty map with preallocated space for entries.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte get​(long key)
      Gets a value mapped by a given key.
      byte getEmptyValue()
      Returns value which indicates that no value has been returned by put or get method.
      byte put​(long key, byte value)
      Puts a mapping between given key and given value to the map.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • YLongToByteMap

        public YLongToByteMap()
        Creates an empty map.
      • YLongToByteMap

        public YLongToByteMap​(int initialCapacity)
        Creates an empty map with preallocated space for entries.
        Parameters:
        initialCapacity - initial capacity of the map
    • Method Detail

      • getEmptyValue

        public byte getEmptyValue()
        Returns value which indicates that no value has been returned by put or get method.
        Returns:
        "empty value"
        See Also:
        put(long, byte), get(long)
      • put

        public byte put​(long key,
                        byte value)
        Puts a mapping between given key and given value to the map.
        Parameters:
        key - key of the mapping
        value - value of the mapping
        Returns:
        previous value of the key, or an empty value if there was no given key in the map.
        See Also:
        getEmptyValue()
      • get

        public byte get​(long key)
        Gets a value mapped by a given key.
        Parameters:
        key - key of the mapping
        Returns:
        value associated with given key or an empty value if there is no given key in the map