org.geotools.util
Class MapEntry

java.lang.Object
  extended byorg.geotools.util.MapEntry
All Implemented Interfaces:
java.util.Map.Entry, java.io.Serializable

public class MapEntry
extends java.lang.Object
implements java.util.Map.Entry, java.io.Serializable

A default implementation of Map.Entry which map an arbitrary key-value pairs. This entry is immutable by default.

Since:
2.1
Version:
$Id: MapEntry.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Martin Desruisseaux
See Also:
Serialized Form

Constructor Summary
MapEntry(java.lang.Object key, java.lang.Object value)
          Creates a new map entry with the specified key-value pair.
 
Method Summary
 boolean equals(java.lang.Object object)
          Compares the specified object with this entry for equality.
 java.lang.Object getKey()
          Returns the key corresponding to this entry.
 java.lang.Object getValue()
          Returns the value corresponding to this entry.
 int hashCode()
          Returns the hash code value for this map entry
 java.lang.Object setValue(java.lang.Object value)
          Replaces the value corresponding to this entry with the specified value (optional operation).
 java.lang.String toString()
          Returns a string representation of this entry.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapEntry

public MapEntry(java.lang.Object key,
                java.lang.Object value)
Creates a new map entry with the specified key-value pair.

Method Detail

getKey

public java.lang.Object getKey()
Returns the key corresponding to this entry.

Specified by:
getKey in interface java.util.Map.Entry

getValue

public java.lang.Object getValue()
Returns the value corresponding to this entry.

Specified by:
getValue in interface java.util.Map.Entry

setValue

public java.lang.Object setValue(java.lang.Object value)
Replaces the value corresponding to this entry with the specified value (optional operation). The default implementation throws an UnsupportedOperationException.

Specified by:
setValue in interface java.util.Map.Entry

equals

public boolean equals(java.lang.Object object)
Compares the specified object with this entry for equality.

Specified by:
equals in interface java.util.Map.Entry

hashCode

public int hashCode()
Returns the hash code value for this map entry

Specified by:
hashCode in interface java.util.Map.Entry

toString

public java.lang.String toString()
Returns a string representation of this entry.



Copyright © GeoTools. All Rights Reserved.