Top Description Constructors Methods
org.apache.commons.collections4.keyvalue

public final Class DefaultMapEntry<K, V>

extends AbstractMapEntry<K, V>
Class Inheritance
Type Parameters
<K>
the type of keys
<V>
the type of mapped values
Imports
java.util.Map, org.apache.commons.collections4.KeyValue

A restricted implementation of Map.Entry that prevents the Map.Entry contract from being broken.
Since
3.0

Constructor Summary

AccessConstructor and Description
public
DefaultMapEntry(final K
the key for the entry, may be null
key
,
final V
the value for the entry, may be null
value
)

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

public
DefaultMapEntry(final KeyValue<? extends K, ? extends V>
the pair to copy, must not be null
pair
)

Constructs a new entry from the specified KeyValue.

public
DefaultMapEntry(final Map.Entry<? extends K, ? extends V>
the entry to copy, must not be null
entry
)

Constructs a new entry from the specified Map.Entry.

Method Summary

Inherited from org.apache.commons.collections4.keyvalue.AbstractMapEntry:
equalshashCodesetValue

Constructor Detail

DefaultMapEntryback to summary
public DefaultMapEntry(final K key, final V value)

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

Parameters
key:K

the key for the entry, may be null

value:V

the value for the entry, may be null

DefaultMapEntryback to summary
public DefaultMapEntry(final KeyValue<? extends K, ? extends V> pair)

Constructs a new entry from the specified KeyValue.

Parameters
pair:KeyValue<? extends K, ? extends V>

the pair to copy, must not be null

Exceptions
NullPointerException:
if the entry is null
DefaultMapEntryback to summary
public DefaultMapEntry(final Map.Entry<? extends K, ? extends V> entry)

Constructs a new entry from the specified Map.Entry.

Parameters
entry:Map.Entry<? extends K, ? extends V>

the entry to copy, must not be null

Exceptions
NullPointerException:
if the entry is null