Class SimpleEntry<T>

  • All Implemented Interfaces:
    Map.Entry<T,​T>

    public class SimpleEntry<T>
    extends Object
    implements Map.Entry<T,​T>
    Straight forward implementation of Map.Entry.
    Note: Does not support null keys.
    Author:
    Markus von RĂ¼den
    • Constructor Detail

      • SimpleEntry

        public SimpleEntry​(T key)
      • SimpleEntry

        public SimpleEntry​(T key,
                           T value)
    • Method Detail

      • equals

        public boolean equals​(Object obj)
        Returns the result of this.key.equals(that.key) && this.value.equals(that.value).
        Specified by:
        equals in interface Map.Entry<T,​T>
        Overrides:
        equals in class Object
        Parameters:
        obj -
        Returns:
        true if both keys and values are equal, false otherwise. False is also returned if obj does not inherit/implement Entry does not match or obj is null.