Package org.apache.commons.collections
Class DefaultMapEntry
java.lang.Object
org.apache.commons.collections.DefaultMapEntry
Deprecated.
Use the version in the keyvalue subpackage. Will be removed in v4.0
A default implementation of
Map.Entry
- Since:
- Commons Collections 1.0
- Version:
- $Revision: 646777 $ $Date: 2008-04-10 14:33:15 +0200 (Thu, 10 Apr 2008) $
- Author:
- James Strachan, Michael A. Smith, Neil O'Toole, Stephen Colebourne
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Constructs a newDefaultMapEntry
with a null key and null value.DefaultMapEntry
(Object key, Object value) Deprecated.Constructs a newDefaultMapEntry
with the given key and given value.DefaultMapEntry
(Map.Entry entry) Deprecated.Constructs a newDefaultMapEntry
with the given key and given value. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Deprecated.Compares this Map Entry with another Map Entry.getKey()
Deprecated.Gets the key from the Map Entry.getValue()
Deprecated.Gets the value from the Map Entry.int
hashCode()
Deprecated.Gets a hashCode compatible with the equals method.void
Deprecated.Sets the key stored in this Map Entry.Deprecated.Sets the value stored in this Map Entry.toString()
Deprecated.Written to match the output of the Map.Entry's used in aHashMap
.
-
Constructor Details
-
DefaultMapEntry
public DefaultMapEntry()Deprecated.Constructs a newDefaultMapEntry
with a null key and null value. -
DefaultMapEntry
Deprecated.Constructs a newDefaultMapEntry
with the given key and given value.- Parameters:
entry
- the entry to copy, must not be null- Throws:
NullPointerException
- if the entry is null
-
DefaultMapEntry
Deprecated.Constructs a newDefaultMapEntry
with the given key and given value.- Parameters:
key
- the key for the entry, may be nullvalue
- the value for the entry, may be null
-
-
Method Details
-
getKey
Deprecated.Gets the key from the Map Entry. -
setKey
Deprecated.Sets the key stored in this Map Entry.This Map Entry is not connected to a Map, so only the local data is changed.
- Parameters:
key
- the new key
-
getValue
Deprecated.Gets the value from the Map Entry. -
setValue
Deprecated.Sets the value stored in this Map Entry.This Map Entry is not connected to a Map, so only the local data is changed.
-
equals
Deprecated.Compares this Map Entry with another Map Entry.Implemented per API documentation of
Map.Entry.equals(Object)
-
hashCode
public int hashCode()Deprecated.Gets a hashCode compatible with the equals method.Implemented per API documentation of
Map.Entry.hashCode()
-
toString
Deprecated.Written to match the output of the Map.Entry's used in aHashMap
.
-