Class AbstractBitwiseTrie.BasicEntry<K,V>

java.lang.Object
org.apache.commons.collections4.trie.AbstractBitwiseTrie.BasicEntry<K,V>
Type Parameters:
K - the type of the keys in this entry.
V - the type of the values in this entry.
All Implemented Interfaces:
Serializable, Map.Entry<K,V>
Direct Known Subclasses:
AbstractPatriciaTrie.TrieEntry
Enclosing class:
AbstractBitwiseTrie<K,V>

abstract static class AbstractBitwiseTrie.BasicEntry<K,V> extends Object implements Map.Entry<K,V>, Serializable
A basic implementation of Map.Entry.
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • key

      protected K key
      The entry's key.
    • value

      protected V value
      The entry's value.
  • Constructor Details

    • BasicEntry

      BasicEntry(K key)
    • BasicEntry

      BasicEntry(K key, V value)
  • Method Details

    • equals

      public boolean equals(Object o)
      Specified by:
      equals in interface Map.Entry<K,V>
      Overrides:
      equals in class Object
    • getKey

      public K getKey()
      Specified by:
      getKey in interface Map.Entry<K,V>
    • getValue

      public V getValue()
      Specified by:
      getValue in interface Map.Entry<K,V>
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface Map.Entry<K,V>
      Overrides:
      hashCode in class Object
    • setKeyValue

      public V setKeyValue(K key, V value)
      Replaces the current key and value with the provided key & value.
      Parameters:
      key - The new key.
      value - The new value.
      Returns:
      The previous value.
    • setValue

      public V setValue(V value)
      Specified by:
      setValue in interface Map.Entry<K,V>
    • toString

      public String toString()
      Overrides:
      toString in class Object