org.apache.ojb.broker.util
Class ReferenceMap.DefaultMapEntry

java.lang.Object
  extended by org.apache.ojb.broker.util.ReferenceMap.DefaultMapEntry
All Implemented Interfaces:
java.util.Map.Entry
Enclosing class:
ReferenceMap

public class ReferenceMap.DefaultMapEntry
extends java.lang.Object
implements java.util.Map.Entry

A default implementation of Map.Entry

Since:
1.0
Author:
James Strachan, Michael A. Smith

Constructor Summary
ReferenceMap.DefaultMapEntry()
          Constructs a new DefaultMapEntry with a null key and null value.
ReferenceMap.DefaultMapEntry(java.lang.Object key, java.lang.Object value)
          Constructs a new DefaultMapEntry with the given key and given value.
 
Method Summary
 boolean equals(java.lang.Object o)
          Implemented per API documentation of Map.Entry.equals(java.lang.Object)
 java.lang.Object getKey()
          Returns the key.
 java.lang.Object getValue()
          Returns the value.
 int hashCode()
          Implemented per API documentation of Map.Entry.hashCode()
 void setKey(java.lang.Object key)
          Sets the key.
 java.lang.Object setValue(java.lang.Object value)
          Note that this method only sets the local reference inside this object and does not modify the original Map.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferenceMap.DefaultMapEntry

public ReferenceMap.DefaultMapEntry()
Constructs a new DefaultMapEntry with a null key and null value.


ReferenceMap.DefaultMapEntry

public ReferenceMap.DefaultMapEntry(java.lang.Object key,
                                    java.lang.Object value)
Constructs a new DefaultMapEntry with the given key and given value.

Parameters:
key - the key for the entry, may be null
value - the value for the entyr, may be null
Method Detail

equals

public boolean equals(java.lang.Object o)
Implemented per API documentation of Map.Entry.equals(java.lang.Object)

Specified by:
equals in interface java.util.Map.Entry
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Implemented per API documentation of Map.Entry.hashCode()

Specified by:
hashCode in interface java.util.Map.Entry
Overrides:
hashCode in class java.lang.Object

getKey

public java.lang.Object getKey()
Returns the key.

Specified by:
getKey in interface java.util.Map.Entry
Returns:
the key

getValue

public java.lang.Object getValue()
Returns the value.

Specified by:
getValue in interface java.util.Map.Entry
Returns:
the value

setKey

public void setKey(java.lang.Object key)
Sets the key. This method does not modify any map.

Parameters:
key - the new key

setValue

public java.lang.Object setValue(java.lang.Object value)
Note that this method only sets the local reference inside this object and does not modify the original Map.

Specified by:
setValue in interface java.util.Map.Entry
Parameters:
value - the new value
Returns:
the old value of the value


(C) 2002 - 2006 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30