Map
implementation that holds a single item and is fixed size. The single key/value pair is specified at creation. The map is fixed size so any action that would change the size is disallowed. However, the put
or setValue
methods can change the value associated with the key.
If trying to remove or clear the map, an UnsupportedOperationException is thrown. If trying to put a new mapping into the map, an IllegalArgumentException is thrown. The put method will only suceed if the key specified is the same as the singleton key.
The key and value can be obtained by:
MapIterator
, see {@link #mapIterator()}KeyValue
interface (just cast - no object creation)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|