Class MapEntry


  • public class MapEntry
    extends java.lang.Object
    Understands an entry in a Map.
    Author:
    Yvonne Wang
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.Object key  
      java.lang.Object value  
    • Field Detail

      • key

        public final java.lang.Object key
      • value

        public final java.lang.Object value
    • Method Detail

      • entry

        public static MapEntry entry​(java.lang.Object key,
                                     java.lang.Object value)
        Creates a new MapEntry.
        Parameters:
        key - the key of the entry to create.
        value - the value of the entry to create.
        Returns:
        the created MapEntry.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

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