org.apache.commons.collections.keyvalue
Class AbstractMapEntryDecorator

java.lang.Object
  |
  +--org.apache.commons.collections.keyvalue.AbstractMapEntryDecorator
All Implemented Interfaces:
KeyValue, java.util.Map.Entry

public abstract class AbstractMapEntryDecorator
extends java.lang.Object
implements java.util.Map.Entry, KeyValue

Provides a base decorator that allows additional functionality to be added to a Map Entry.

Since:
Commons Collections 3.0
Version:
$Revision: 1.4 $ $Date: 2004/02/18 01:00:08 $
Author:
Stephen Colebourne

Constructor Summary
AbstractMapEntryDecorator(java.util.Map.Entry entry)
          Constructor that wraps (not copies).
 
Method Summary
 boolean equals(java.lang.Object object)
           
 java.lang.Object getKey()
          Gets the key from the pair.
 java.lang.Object getValue()
          Gets the value from the pair.
 int hashCode()
           
 java.lang.Object setValue(java.lang.Object object)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractMapEntryDecorator

public AbstractMapEntryDecorator(java.util.Map.Entry entry)
Constructor that wraps (not copies).

Parameters:
entry - the Map.Entry to decorate, must not be null
Throws:
java.lang.IllegalArgumentException - if the collection is null
Method Detail

getKey

public java.lang.Object getKey()
Description copied from interface: KeyValue
Gets the key from the pair.

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

getValue

public java.lang.Object getValue()
Description copied from interface: KeyValue
Gets the value from the pair.

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

setValue

public java.lang.Object setValue(java.lang.Object object)
Specified by:
setValue in interface java.util.Map.Entry

equals

public boolean equals(java.lang.Object object)
Specified by:
equals in interface java.util.Map.Entry
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Specified by:
hashCode in interface java.util.Map.Entry
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2001-2004 The Apache Software Foundation. All Rights Reserved.