org.apache.commons.collections.keyvalue

Class AbstractMapEntryDecorator

Implemented Interfaces:
Map.Entry, KeyValue
Known Direct Subclasses:
AbstractDualBidiMap.MapEntry

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

Provides a base decorator that allows additional functionality to be added to a Map Entry.
Version:
$Revision: 1.4 $ $Date: 2004/02/18 01:00:08 $
Author:
Stephen Colebourne
Since:
Commons Collections 3.0

Field Summary

protected Map.Entry
entry
The Map.Entry to decorate

Constructor Summary

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

Method Summary

boolean
equals(Object object)
Object
getKey()
Gets the key from the pair.
protected Map.Entry
getMapEntry()
Gets the map being decorated.
Object
getValue()
Gets the value from the pair.
int
hashCode()
Object
setValue(Object object)
String
toString()

Field Details

entry

protected final Map.Entry entry
The Map.Entry to decorate

Constructor Details

AbstractMapEntryDecorator

public AbstractMapEntryDecorator(Map.Entry entry)
Constructor that wraps (not copies).
Parameters:
entry - the Map.Entry to decorate, must not be null

Method Details

equals

public boolean equals(Object object)

getKey

public Object getKey()
Gets the key from the pair.
Specified by:
getKey in interface KeyValue
Returns:
the key

getMapEntry

protected Map.Entry getMapEntry()
Gets the map being decorated.
Returns:
the decorated map

getValue

public Object getValue()
Gets the value from the pair.
Specified by:
getValue in interface KeyValue
Returns:
the value

hashCode

public int hashCode()

setValue

public Object setValue(Object object)

toString

public String toString()

Copyright © 2001-2006 Apache Software Foundation. All Rights Reserved.