public final class UnmodifiableMapEntry extends AbstractMapEntry implements Unmodifiable
Map.Entry that throws
UnsupportedOperationException when setValue is called.| Constructor and Description |
|---|
UnmodifiableMapEntry(KeyValue pair)
Constructs a new entry from the specified
KeyValue. |
UnmodifiableMapEntry(java.util.Map.Entry entry)
Constructs a new entry from the specified
Map.Entry. |
UnmodifiableMapEntry(java.lang.Object key,
java.lang.Object value)
Constructs a new entry with the specified key and given value.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
setValue(java.lang.Object value)
Throws UnsupportedOperationException.
|
equals, hashCodegetKey, getValue, toStringpublic 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 © 2010 - 2023 Adobe. All Rights Reserved