org.apache.commons.collections.keyvalue
Class AbstractKeyValue

java.lang.Object
  |
  +--org.apache.commons.collections.keyvalue.AbstractKeyValue
All Implemented Interfaces:
KeyValue
Direct Known Subclasses:
AbstractMapEntry, DefaultKeyValue

public abstract class AbstractKeyValue
extends java.lang.Object
implements KeyValue

Abstract pair class to assist with creating KeyValue and MapEntry implementations.

Since:
Commons Collections 3.0
Version:
$Revision: 1.3 $ $Date: 2004/02/18 01:00:08 $
Author:
James Strachan, Michael A. Smith, Neil O'Toole, Stephen Colebourne

Method Summary
 java.lang.Object getKey()
          Gets the key from the pair.
 java.lang.Object getValue()
          Gets the value from the pair.
 java.lang.String toString()
          Gets a debugging String view of the pair.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getKey

public java.lang.Object getKey()
Gets the key from the pair.

Specified by:
getKey in interface KeyValue
Returns:
the key

getValue

public java.lang.Object getValue()
Gets the value from the pair.

Specified by:
getValue in interface KeyValue
Returns:
the value

toString

public java.lang.String toString()
Gets a debugging String view of the pair.

Overrides:
toString in class java.lang.Object
Returns:
a String view of the entry


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