public final class

DefaultMapEntry

extends AbstractMapEntry
java.lang.Object
   ↳ org.apache.commons.collections.keyvalue.AbstractKeyValue
     ↳ org.apache.commons.collections.keyvalue.AbstractMapEntry
       ↳ org.apache.commons.collections.keyvalue.DefaultMapEntry

Class Overview

A restricted implementation of java.util.Map.Entry that prevents the Map.Entry contract from being broken.

Summary

[Expand]
Inherited Fields
From class org.apache.commons.collections.keyvalue.AbstractKeyValue
Public Constructors
DefaultMapEntry(Object key, Object value)
Constructs a new entry with the specified key and given value.
DefaultMapEntry(KeyValue pair)
Constructs a new entry from the specified KeyValue.
DefaultMapEntry(Entry entry)
Constructs a new entry from the specified Map.Entry.
[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 DefaultMapEntry (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 DefaultMapEntry (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 DefaultMapEntry (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