⇒ Index (Frames) |  ⇒ Index (No Frames) |  ⇒ Package |  ⇒ Package Tree |  ⇒ Full Tree 
org.apache.commons.collections.keyvalue

Class DefaultMapEntry

java.lang.Object
|
+--org.apache.commons.collections.keyvalue.AbstractKeyValue
   |
   +--org.apache.commons.collections.keyvalue.AbstractMapEntry
      |
      +--org.apache.commons.collections.keyvalue.DefaultMapEntry


public final class DefaultMapEntry
extends AbstractMapEntry

A restricted implementation of java.util.Map.Entry that prevents the MapEntry contract from being broken.
Since:
Commons Collections 3.0
Authors:
James Strachan
Michael A. Smith
Neil O'Toole
Stephen Colebourne

Constructor Summary

DefaultMapEntry(final Object key, final Object value)

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

DefaultMapEntry(final KeyValue pair)

Constructs a new entry from the specified KeyValue.

DefaultMapEntry(final Map.Entry entry)

Constructs a new entry from the specified MapEntry.

Constructor Details

DefaultMapEntry

public DefaultMapEntry(final KeyValue pair)

Constructs a new entry from the specified KeyValue.

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

DefaultMapEntry

public DefaultMapEntry(final Map.Entry entry)

Constructs a new entry from the specified MapEntry.

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

DefaultMapEntry

public DefaultMapEntry(final Object key, final 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