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, hashCode
getKey, getValue, toString
public 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.Entry
setValue
in class AbstractMapEntry
value
- the new valuejava.lang.UnsupportedOperationException
- always"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"