java.util.Map.Entry, KeyValue, Unmodifiablepublic final class UnmodifiableMapEntry extends AbstractMapEntry implements Unmodifiable
Map.Entry that throws
UnsupportedOperationException when setValue is called.key, value| Constructor | Description |
|---|---|
UnmodifiableMapEntry(java.lang.Object key,
java.lang.Object value) |
Constructs a new entry with the specified key and given value.
|
UnmodifiableMapEntry(java.util.Map.Entry entry) |
Constructs a new entry from the specified
Map.Entry. |
UnmodifiableMapEntry(KeyValue pair) |
Constructs a new entry from the specified
KeyValue. |
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.Object |
setValue(java.lang.Object value) |
Throws UnsupportedOperationException.
|
getKey, getValue, toStringequals, hashCodepublic UnmodifiableMapEntry(java.lang.Object key,
java.lang.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 nulljava.lang.NullPointerException - if the entry is nullpublic UnmodifiableMapEntry(java.util.Map.Entry entry)
Map.Entry.entry - the entry to copy, must not be nulljava.lang.NullPointerException - if the entry is nullpublic java.lang.Object setValue(java.lang.Object value)
setValue in interface java.util.Map.EntrysetValue in class AbstractMapEntryvalue - the new valuejava.lang.UnsupportedOperationException - alwaysCopyright © 2001-2018 Apache Software Foundation. All Rights Reserved.