com.xavax.xstore.util
Class NamedValue

Object
  extended byNamedValue

public class NamedValue
extends Object

NamedValue encapsulates a name:value pair and is used to construct an RDictionary (reverse dictionary). The value can be any object; however, a constructors is provided for integer values since that is the most common use of this class.


Constructor Summary
NamedValue(String name, int value)
          Construct a NamedValue using the specified name and value.
NamedValue(String name, Object value)
          Construct a NamedValue using the specified name and value.
 
Method Summary
 String name()
          Returns the name of this name:value pair.
 String toString()
          Returns a string representation of this name:value pair.
 Object value()
          Returns the value of this name:value pair.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NamedValue

public NamedValue(String name,
                  Object value)
Construct a NamedValue using the specified name and value.

Parameters:
name - the name of this pair.
value - the value of this pair.

NamedValue

public NamedValue(String name,
                  int value)
Construct a NamedValue using the specified name and value.

Parameters:
name - the name of this pair.
value - the value of this pair.
Method Detail

name

public String name()
Returns the name of this name:value pair.

Returns:
the name of this name:value pair.

value

public Object value()
Returns the value of this name:value pair.

Returns:
the value of this name:value pair.

toString

public String toString()
Returns a string representation of this name:value pair.

Returns:
a string representation of this name:value pair.