TC Java
2009 Version

gov.nih.nlm.nls.tc.Lib
Class KeyValueObj<K,V>

java.lang.Object
  extended by gov.nih.nlm.nls.tc.Lib.KeyValueObj<K,V>

public class KeyValueObj<K,V>
extends java.lang.Object

This class is a key value object

History:

Version:
V-2009
Author:
NLM Lexical Systems Group

Constructor Summary
KeyValueObj()
          Create a key-value object.
KeyValueObj(K key, V value)
          Create a key-value object by specifying key and value.
 
Method Summary
 K GetKey()
          Get key from a key-value object.
 V GetValue()
          Get value from a key-value object.
 void SetKey(K key)
          Set key to a key-value object.
 void SetValue(V value)
          Set value to a key-value object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyValueObj

public KeyValueObj()
Create a key-value object.


KeyValueObj

public KeyValueObj(K key,
                   V value)
Create a key-value object by specifying key and value.

Method Detail

SetKey

public void SetKey(K key)
Set key to a key-value object.

Parameters:
key - key in key-value object

SetValue

public void SetValue(V value)
Set value to a key-value object.

Parameters:
value - value in key-value object

GetKey

public K GetKey()
Get key from a key-value object.

Returns:
key from a key-value object

GetValue

public V GetValue()
Get value from a key-value object.

Returns:
value from a key-value object

TC Java
2009 Version

Submit a bug or feature

Copyright © 2009 National Library of Medicine