Class YLongToLongMap

java.lang.Object
de.hybris.platform.util.collections.fast.YLongToLongMap

public class YLongToLongMap extends Object
Map which maps key of primitive type long to value of primitive type long.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an empty map.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    containsKey(long key)
    Checks whether map contains entry with given key.
    long
    get(long key)
    Gets a value mapped by a given key.
    long
    Returns value which indicates that no value has been returned by put or get method.
    long
    put(long key, long 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 Details

    • YLongToLongMap

      public YLongToLongMap()
      Creates an empty map.
  • Method Details

    • getEmptyValue

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

      public long put(long key, long 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:
    • get

      public long 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
    • containsKey

      public boolean containsKey(long key)
      Checks whether map contains entry with given key.
      Parameters:
      key - key to check
      Returns:
      true if map contains mapping with given key, false otherwise