Package groovy.util
Class MapEntry
java.lang.Object
groovy.util.MapEntry
- All Implemented Interfaces:
Map.Entry
A Map.Entry implementation.
-
Constructor Details
-
MapEntry
Creates a map entry with the supplied key and value.- Parameters:
key- the entry keyvalue- the entry value
-
-
Method Details
-
equals
-
equals
Compares this entry with anotherMapEntry.- Parameters:
that- the entry to compare with- Returns:
trueif both key and value are equal
-
hashCode
public int hashCode() -
toString
-
getKey
-
setKey
Updates the entry key.- Parameters:
key- the new key
-
getValue
-
setValue
-
hash
Helper method to handle object hashes for possibly null values
-