Package org.apache.commons.chain.web
Class MapEntry
java.lang.Object
org.apache.commons.chain.web.MapEntry
- All Implemented Interfaces:
Map.Entry
Map.Entry implementation that can be constructed to either be read-only or not.
- Version:
- $Revision: 480477 $ $Date: 2006-11-29 08:34:52 +0000 (Wed, 29 Nov 2006) $
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
key
The entry key.
-
value
The entry value.
-
modifiable
private boolean modifiableWhether the entry can be modified.
-
-
Constructor Details
-
MapEntry
Creates a map entry that can either allow modifications or not.
- Parameters:
key
- The entry keyvalue
- The entry valuemodifiable
- Whether the entry should allow modification or not
-
-
Method Details
-
getKey
Gets the entry key.
-
getValue
Gets the entry value.
-
setValue
Sets the entry value if the entry can be modified.
- Specified by:
setValue
in interfaceMap.Entry
- Parameters:
val
- The new value- Returns:
- The old entry value
- Throws:
UnsupportedOperationException
- If the entry cannot be modified
-
equals
Determines if this entry is equal to the passed object.
-
hashCode
public int hashCode()Returns the hashcode for this entry.
-