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>
public class MapEntry<K,V> extends Object implements Map.Entry<K,V>, Serializable
A default implementation ofMap.Entry
which map an arbitrary key-value pairs. This entry is immutable by default.- Since:
- 2.1
- Author:
- Martin Desruisseaux (IRD)
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
Compares the specified object with this entry for equality.K
getKey()
Returns the key corresponding to this entry.V
getValue()
Returns the value corresponding to this entry.int
hashCode()
Returns the hash code value for this map entryV
setValue(V value)
Replaces the value corresponding to this entry with the specified value (optional operation).String
toString()
Returns a string representation of this entry.
-
-
-
Method Detail
-
getKey
public K getKey()
Returns the key corresponding to this entry.
-
getValue
public V getValue()
Returns the value corresponding to this entry.
-
setValue
public V setValue(V value)
Replaces the value corresponding to this entry with the specified value (optional operation). The default implementation throws anUnsupportedOperationException
.
-
equals
public boolean equals(Object object)
Compares the specified object with this entry for equality.
-
hashCode
public int hashCode()
Returns the hash code value for this map entry
-
-