Package gnu.kawa.util

Class HashNode<K,​V>

  • All Implemented Interfaces:
    java.io.Serializable, java.util.Map.Entry<K,​V>

    public class HashNode<K,​V>
    extends java.util.AbstractMap.SimpleEntry<K,​V>
    implements java.util.Map.Entry<K,​V>
    An entry in a GeneralHashTable. This is a public class to allow overriding.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int keyHash  
      HashNode<K,​V> next  
    • Constructor Summary

      Constructors 
      Constructor Description
      HashNode​(K key, V value)  
      HashNode​(K key, V value, int keyHash)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)
      Implements the general Map.Entry specification.
      V get​(V defaultValue)  
      • Methods inherited from class java.util.AbstractMap.SimpleEntry

        getKey, getValue, hashCode, setValue, toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map.Entry

        getKey, getValue, hashCode, setValue
    • Field Detail

      • keyHash

        protected int keyHash
    • Constructor Detail

      • HashNode

        public HashNode​(K key,
                        V value)
      • HashNode

        public HashNode​(K key,
                        V value,
                        int keyHash)
    • Method Detail

      • get

        public V get​(V defaultValue)
      • equals

        public boolean equals​(java.lang.Object o)
        Implements the general Map.Entry specification. But note that a GeneralHashTable subclass may override matches, so it no longer uses equals, in which case it won't be consistent with this method, unless it is overridden.
        Specified by:
        equals in interface java.util.Map.Entry<K,​V>
        Overrides:
        equals in class java.util.AbstractMap.SimpleEntry<K,​V>