org.peace_tools.generic
Class Pair

java.lang.Object
  extended by org.peace_tools.generic.Pair

public class Pair
extends java.lang.Object

A simple class to encapsulate a pair that is used to describe pairs of values that are stored in other data structures.


Field Summary
private  java.lang.String name
          The name set for this parameter.
private  java.lang.String value
          The value set for this parameter.
 
Constructor Summary
Pair(java.lang.String name, java.lang.String value)
          The constructor merely initializes the pair encapsulated by this object.
 
Method Summary
 java.lang.String getName()
          The name set for this parameter.
 java.lang.String getValue()
          The value associated with this parameter.
 java.lang.String toString()
          Override the default toString() method to return name and value separated by a colon.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

private final java.lang.String name
The name set for this parameter. This value is set when this parameter object is instantiated.


value

private final java.lang.String value
The value set for this parameter. This value is set when this parameter object is instantiated.

Constructor Detail

Pair

public Pair(java.lang.String name,
            java.lang.String value)
The constructor merely initializes the pair encapsulated by this object.

Parameters:
name - The name of the parameter.
value - The value set for the parameter.
Method Detail

getName

public java.lang.String getName()
The name set for this parameter.

Returns:
This method returns the name set for this parameter.

getValue

public java.lang.String getValue()
The value associated with this parameter.

Returns:
The value associated with this parameter.

toString

public java.lang.String toString()
Override the default toString() method to return name and value separated by a colon.

Overrides:
toString in class java.lang.Object
Returns:
The name and value information associated with this pair separated by a colon (:).