Class MapEntry<K,​V>

  • Type Parameters:
    K - type of the Key
    V - type of the Value
    All Implemented Interfaces:
    java.util.Map.Entry<K,​V>
    Direct Known Subclasses:
    MatchingQueryTerms.MatchingTerm

    public class MapEntry<K,​V>
    extends java.lang.Object
    implements java.util.Map.Entry<K,​V>
    Implementation of java.util.Map.Entry.
    Since:
    3.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected K key  
      protected V value  
    • Constructor Summary

      Constructors 
      Constructor Description
      MapEntry​(K _key, V _value)
      Construct a new Entry
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)
      Checks if another object is equal to this one, i.e.
      K getKey()
      V getValue()
      int hashCode()
      Creates a hashcode combining both keys and values.
      K setKey​(K _key)
      Allow the key to be changed
      V setValue​(V _value)
      java.lang.String toString()
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • key

        protected K key
      • value

        protected V value
    • Constructor Detail

      • MapEntry

        public MapEntry​(K _key,
                        V _value)
        Construct a new Entry
    • Method Detail

      • getKey

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

        public V getValue()
        Specified by:
        getValue in interface java.util.Map.Entry<K,​V>
      • setValue

        public V setValue​(V _value)
        Specified by:
        setValue in interface java.util.Map.Entry<K,​V>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • setKey

        public K setKey​(K _key)
        Allow the key to be changed
      • equals

        public boolean equals​(java.lang.Object o)
        Checks if another object is equal to this one, i.e. all keys are equal and all values are equal
        Specified by:
        equals in interface java.util.Map.Entry<K,​V>
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Creates a hashcode combining both keys and values.
        Specified by:
        hashCode in interface java.util.Map.Entry<K,​V>
        Overrides:
        hashCode in class java.lang.Object