Interface BasicEMap.Entry<K,V>

All Superinterfaces:
Map.Entry<K,V>
All Known Implementing Classes:
BasicEMap.EntryImpl
Enclosing class:
BasicEMap<K,V>

public static interface BasicEMap.Entry<K,V> extends Map.Entry<K,V>
An extended implementation interface for caching hash values and for updating an entry that may be manufactured as a uninitialized instance by a factory. No client is expected to use this interface, other than to implement it in conjunction with a map implementation.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the hash code of the key.
    void
    setHash(int hash)
    Sets the hash code of the key.
    void
    setKey(K key)
    Sets the key.

    Methods inherited from interface java.util.Map.Entry

    equals, getKey, getValue, hashCode, setValue
  • Method Details

    • setKey

      void setKey(K key)
      Sets the key. This should only be called by the map implementation, since the key of an entry already in the map must be immutable.
      Parameters:
      key - the key.
    • getHash

      int getHash()
      Returns the hash code of the key. Only the map implementation would really care.
    • setHash

      void setHash(int hash)
      Sets the hash code of the key. This should only be called by the map implementation, since the hash code of the key of an entry already in the map must be immutable.
      Parameters:
      hash - the hash.