Package org.apache.commons.chain.web
Class MapEntry<T>
java.lang.Object
org.apache.commons.chain.web.MapEntry<T>
- Type Parameters:
T
- type of the value
Map.Entry
implementation that can be constructed to either be read-only
or not.- Version:
- $Revision$ $Date$
-
Constructor Summary
-
Method Summary
-
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<String,
T> - 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
Returns the hashcode for this entry.
-