public final class

UnmodifiableMapEntry

extends AbstractMapEntry
implements Unmodifiable
java.lang.Object
   ↳ org.apache.commons.collections.keyvalue.AbstractKeyValue
     ↳ org.apache.commons.collections.keyvalue.AbstractMapEntry
       ↳ org.apache.commons.collections.keyvalue.UnmodifiableMapEntry

Class Overview

A java.util.Map.Entry Map.Entry that throws UnsupportedOperationException when setValue is called.

Summary

[Expand]
Inherited Fields
From class org.apache.commons.collections.keyvalue.AbstractKeyValue
Public Constructors
UnmodifiableMapEntry(Object key, Object value)
Constructs a new entry with the specified key and given value.
UnmodifiableMapEntry(KeyValue pair)
Constructs a new entry from the specified KeyValue.
UnmodifiableMapEntry(Entry entry)
Constructs a new entry from the specified Map.Entry.
Public Methods
Object setValue(Object value)
Throws UnsupportedOperationException.
[Expand]
Inherited Methods
From class org.apache.commons.collections.keyvalue.AbstractMapEntry
From class org.apache.commons.collections.keyvalue.AbstractKeyValue
From class java.lang.Object
From interface java.util.Map.Entry
From interface org.apache.commons.collections.KeyValue

Public Constructors

public UnmodifiableMapEntry (Object key, Object value)

Constructs a new entry with the specified key and given value.

Parameters
key the key for the entry, may be null
value the value for the entry, may be null

public UnmodifiableMapEntry (KeyValue pair)

Constructs a new entry from the specified KeyValue.

Parameters
pair the pair to copy, must not be null
Throws
NullPointerException if the entry is null

public UnmodifiableMapEntry (Entry entry)

Constructs a new entry from the specified Map.Entry.

Parameters
entry the entry to copy, must not be null
Throws
NullPointerException if the entry is null

Public Methods

public Object setValue (Object value)

Throws UnsupportedOperationException.

Parameters
value the new value
Returns
  • the previous value