org.norther.tammi.acorn.util
Class GettableKeyValue<K,V>

java.lang.Object
  extended by org.norther.tammi.acorn.util.GettableKeyValue<K,V>
Type Parameters:
K - the key type.
V - the value type.
All Implemented Interfaces:
Serializable, Cloneable, KeyValue<K,V>

public class GettableKeyValue<K,V>
extends Object
implements KeyValue<K,V>, Cloneable, Serializable

A gettable implementation of KeyValue.

Version:
$Id: GettableKeyValue.java,v 1.6 2009/10/29 21:44:08 cvsimp Exp $
Author:
Ilkka Priha
See Also:
Serialized Form

Constructor Summary
GettableKeyValue(K k, V v)
          Constructs a specific key value.
 
Method Summary
 Object clone()
           
 boolean equals(Object other)
           
 K getKey()
          Gets the key.
 V getValue()
          Gets the value.
 int hashCode()
           
 void setKey(K k)
          Sets the key.
 void setValue(V v)
          Sets the value.
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GettableKeyValue

public GettableKeyValue(K k,
                        V v)
Constructs a specific key value.

Parameters:
k - the key.
v - the value.
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

clone

public Object clone()
Overrides:
clone in class Object

getKey

public K getKey()
Description copied from interface: KeyValue
Gets the key.

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

setKey

public void setKey(K k)
Description copied from interface: KeyValue
Sets the key.

Specified by:
setKey in interface KeyValue<K,V>
Parameters:
k - the key.

getValue

public V getValue()
Description copied from interface: KeyValue
Gets the value.

Specified by:
getValue in interface KeyValue<K,V>
Returns:
the value.

setValue

public void setValue(V v)
Description copied from interface: KeyValue
Sets the value.

Specified by:
setValue in interface KeyValue<K,V>
Parameters:
v - the value.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2004 The Norther Organization. All rights reserved.