Skip to content

Most visited

Recently visited

navigation
Added in API level 1

Map.Entry

public static interface Map.Entry

java.util.Map.Entry<K, V>
Known Indirect Subclasses


Map.Entry is a key/value mapping contained in a Map.

Summary

Public methods

abstract boolean equals(Object object)

Compares the specified object to this Map.Entry and returns if they are equal.

abstract K getKey()

Returns the key.

abstract V getValue()

Returns the value.

abstract int hashCode()

Returns an integer hash code for the receiver.

abstract V setValue(V object)

Sets the value of this entry to the specified value, replacing any existing value.

Public methods

equals

Added in API level 1
boolean equals (Object object)

Compares the specified object to this Map.Entry and returns if they are equal. To be equal, the object must be an instance of Map.Entry and have the same key and value.

Parameters
object Object: the Object to compare with this Object.
Returns
boolean true if the specified Object is equal to this Map.Entry, false otherwise.

See also:

getKey

Added in API level 1
K getKey ()

Returns the key.

Returns
K the key

getValue

Added in API level 1
V getValue ()

Returns the value.

Returns
V the value

hashCode

Added in API level 1
int hashCode ()

Returns an integer hash code for the receiver. Object which are equal return the same value for this method.

Returns
int the receiver's hash code.

See also:

setValue

Added in API level 1
V setValue (V object)

Sets the value of this entry to the specified value, replacing any existing value.

Parameters
object V: the new value to set.
Returns
V object the replaced value of this entry.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.