Compares the specified object with this entry for equality.
Compares the specified object with this entry for equality.
the object to be compared for equality with this map entry
true if the specified object is equal to this map entry
Returns the key corresponding to this Entry
.
Returns the key corresponding to this Entry
.
the key corresponding to this entry
Returns the value corresponding to this entry.
Returns the value corresponding to this entry.
the value corresponding to this entry
Returns the hash code value for this map entry.
Returns the hash code value for this map entry.
the hash code value for this map entry
the key of this entry
Throws UnsupportedOperationException
.
Throws UnsupportedOperationException
.
UnsupportedOperationException
unconditionally
Returns a String
representation of this Entry
consisting of
concatenating the result of invoking toString
on the key
,
an equals sign, and the result of invoking toString
on the value
.
Returns a String
representation of this Entry
consisting of
concatenating the result of invoking toString
on the key
,
an equals sign, and the result of invoking toString
on the value
.
a String
already!
the value of this entry
A case class implementation of
java.util.Map.Entry
to make it easier to test JavaMap
s with ScalaTest Matchers.In Java,
java.util.Map
is not a subtype ofjava.util.Collection
, and does not actually define an element type. You can ask a JavaMap
for an “entry set” via theentrySet
method, which will return theMap
's key/value pairs wrapped in a set ofjava.util.Map.Entry
, but aMap
is not actually a collection ofEntry
. To make JavaMap
s easier to work with, however, ScalaTest matchers allows you to treat a JavaMap
as a collection ofEntry
, and defines this convenience implementation ofjava.util.Map.Entry
. Here's how you use it:the key of this entry
the value of this entry