Package org.geotools.util
Class MapEntry<K,V>
Object
MapEntry<K,V>
- Type Parameters:
K
- The class of key elements.V
- The class of value elements.
- All Implemented Interfaces:
Serializable
,Map.Entry<K,
V>
A default implementation of
Map.Entry
which map an arbitrary key-value pairs. This entry is
immutable by default.- Since:
- 2.1
- Author:
- Martin Desruisseaux (IRD)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares the specified object with this entry for equality.getKey()
Returns the key corresponding to this entry.getValue()
Returns the value corresponding to this entry.int
hashCode()
Returns the hash code value for this map entryReplaces the value corresponding to this entry with the specified value (optional operation).toString()
Returns a string representation of this entry.
-
Constructor Details
-
MapEntry
Creates a new map entry with the specified key-value pair.- Parameters:
key
- The key.value
- The value.
-
-
Method Details
-
getKey
Returns the key corresponding to this entry. -
getValue
Returns the value corresponding to this entry. -
setValue
Replaces the value corresponding to this entry with the specified value (optional operation). The default implementation throws anUnsupportedOperationException
. -
equals
Compares the specified object with this entry for equality. -
hashCode
public int hashCode()Returns the hash code value for this map entry -
toString
Returns a string representation of this entry.
-