Class AbstractMapEntryDecorator<K,​V>

  • Type Parameters:
    K - the type of keys
    V - the type of mapped values
    All Implemented Interfaces:
    java.util.Map.Entry<K,​V>, KeyValue<K,​V>

    public abstract class AbstractMapEntryDecorator<K,​V>
    extends java.lang.Object
    implements java.util.Map.Entry<K,​V>, KeyValue<K,​V>
    Provides a base decorator that allows additional functionality to be added to a Map.Entry.
    Since:
    3.0
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractMapEntryDecorator​(java.util.Map.Entry<K,​V> entry)
      Constructor that wraps (not copies).
    • Constructor Detail

      • AbstractMapEntryDecorator

        public AbstractMapEntryDecorator​(java.util.Map.Entry<K,​V> entry)
        Constructor that wraps (not copies).
        Parameters:
        entry - the Map.Entry to decorate, must not be null
        Throws:
        java.lang.NullPointerException - if the collection is null
    • Method Detail

      • getKey

        public K getKey()
        Description copied from interface: KeyValue
        Gets the key from the pair.
        Specified by:
        getKey in interface KeyValue<K,​V>
        Specified by:
        getKey in interface java.util.Map.Entry<K,​V>
        Returns:
        the key
      • getValue

        public V getValue()
        Description copied from interface: KeyValue
        Gets the value from the pair.
        Specified by:
        getValue in interface KeyValue<K,​V>
        Specified by:
        getValue in interface java.util.Map.Entry<K,​V>
        Returns:
        the value
      • setValue

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

        public boolean equals​(java.lang.Object object)
        Specified by:
        equals in interface java.util.Map.Entry<K,​V>
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Map.Entry<K,​V>
        Overrides:
        hashCode in class java.lang.Object
      • toString

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