org.jivesoftware.smack.util.collections
Class AbstractKeyValue<K,V>

java.lang.Object
  extended by org.jivesoftware.smack.util.collections.AbstractKeyValue<K,V>
All Implemented Interfaces:
KeyValue<K,V>
Direct Known Subclasses:
AbstractMapEntry

public abstract class AbstractKeyValue<K,V>
extends java.lang.Object
implements KeyValue<K,V>

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

Since:
Commons Collections 3.0
Version:
$Revision: 1.1 $ $Date: 2005/10/11 17:05:32 $
Author:
James Strachan, Michael A. Smith, Neil O'Toole, Matt Hall, John Watkinson, Stephen Colebourne

Method Summary
 K getKey()
          Gets the key from the pair.
 V 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 K getKey()
Gets the key from the pair.

Specified by:
getKey in interface KeyValue<K,V>
Returns:
the key

getValue

public V getValue()
Gets the value from the pair.

Specified by:
getValue in interface KeyValue<K,V>
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