org.apache.commons.collections.keyvalue
Class AbstractKeyValue
- KeyValue
public abstract class AbstractKeyValue
Abstract pair class to assist with creating KeyValue and MapEntry implementations.
Version:
- James Strachan
- Michael A. Smith
- Neil O'Toole
- Stephen Colebourne
- Commons Collections 3.0
protected Object | key - The key
|
protected Object | value - The value
|
AbstractKeyValue(Object key, Object value) - Constructs a new pair with the specified key and given value.
|
Object | getKey() - Gets the key from the pair.
|
Object | getValue() - Gets the value from the pair.
|
String | toString() - Gets a debugging String view of the pair.
|
key
protected Object key
The key
value
protected Object value
The value
AbstractKeyValue
protected AbstractKeyValue(Object key,
Object value)
Constructs a new pair with the specified key and given value.
key
- the key for the entry, may be nullvalue
- the value for the entry, may be null
getKey
public Object getKey()
Gets the key from the pair.
- getKey in interface KeyValue
- the key
getValue
public Object getValue()
Gets the value from the pair.
- getValue in interface KeyValue
- the value
toString
public String toString()
Gets a debugging String view of the pair.
- a String view of the entry
Copyright © 2001-2005 Apache Software Foundation. All Rights Reserved.