Interface LongEntry<V>

Type Parameters:
V - The type of the value.

public interface LongEntry<V>
Represents a key-value mapping. This entry type is used by the LongHashMap.
Since:
1.3
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the component 'key' of the key of this mapping.
    Returns the value of this mapping.
    void
    setValue(V value)
    Sets the value of this mapping.
  • Method Details

    • getKey

      long getKey()
      Returns the component 'key' of the key of this mapping.
      Returns:
      The key of this mapping.
    • getValue

      V getValue()
      Returns the value of this mapping.
      Returns:
      The value. Not null.
    • setValue

      void setValue(V value)
      Sets the value of this mapping. The previous value is replaced.

      This method can be used instead of map.put(key, value). Iterators do not throw a ConcurrentModificationException if this method is used.

      Parameters:
      value - The new value of this mapping. Must not be null.
      Throws:
      IllegalArgumentException - If the new value is null.