public final class UnmodifiableMapEntry extends AbstractMapEntry implements Unmodifiable
Map.Entry that throws
UnsupportedOperationException when setValue is called.key, value| Constructor and Description |
|---|
UnmodifiableMapEntry(KeyValue pair)
Constructs a new entry from the specified
KeyValue. |
UnmodifiableMapEntry(Map.Entry entry)
Constructs a new entry from the specified
Map.Entry. |
UnmodifiableMapEntry(Object key,
Object value)
Constructs a new entry with the specified key and given value.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
setValue(Object value)
Throws UnsupportedOperationException.
|
equals, hashCodegetKey, getValue, toStringpublic UnmodifiableMapEntry(Object key, Object value)
key - the key for the entry, may be nullvalue - the value for the entry, may be nullpublic UnmodifiableMapEntry(KeyValue pair)
KeyValue.pair - the pair to copy, must not be nullNullPointerException - if the entry is nullpublic UnmodifiableMapEntry(Map.Entry entry)
Map.Entry.entry - the entry to copy, must not be nullNullPointerException - if the entry is nullpublic Object setValue(Object value)
setValue in interface Map.EntrysetValue in class AbstractMapEntryvalue - the new valueUnsupportedOperationException - alwaysCopyright © 2001–2015 The Apache Software Foundation. All rights reserved.