K
- the type of keysV
- the type of mapped valuespublic final class UnmodifiableMapEntry<K,V> extends AbstractMapEntry<K,V> implements Unmodifiable
Map.Entry
that throws
UnsupportedOperationException when setValue
is called.Constructor and Description |
---|
UnmodifiableMapEntry(KeyValue<? extends K,? extends V> pair)
Constructs a new entry from the specified
KeyValue . |
UnmodifiableMapEntry(K key,
V value)
Constructs a new entry with the specified key and given value.
|
UnmodifiableMapEntry(Map.Entry<? extends K,? extends V> entry)
Constructs a new entry from the specified
Map.Entry . |
Modifier and Type | Method and Description |
---|---|
V |
setValue(V value)
Throws UnsupportedOperationException.
|
equals, hashCode
getKey, getValue, setKey, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
comparingByKey, comparingByKey, comparingByValue, comparingByValue, getKey, getValue
public UnmodifiableMapEntry(K key, V value)
key
- the key for the entry, may be nullvalue
- the value for the entry, may be nullpublic UnmodifiableMapEntry(KeyValue<? extends K,? extends V> pair)
KeyValue
.pair
- the pair to copy, must not be nullNullPointerException
- if the entry is nullpublic UnmodifiableMapEntry(Map.Entry<? extends K,? extends V> entry)
Map.Entry
.entry
- the entry to copy, must not be nullNullPointerException
- if the entry is nullCopyright © 2006–2022 Apache Software Foundation. All rights reserved.