com.neoworks.util
Class Pair

java.lang.Object
  |
  +--com.neoworks.util.Pair

public class Pair
extends java.lang.Object

Holds a pair of Objects. Useful for passing pairs of values, surprisingly.

Version:
$Revision: 1.4 $
Author:
Nick Vincent (nick@neoworks.com)

Field Summary
 java.lang.Object first
          First field in the Pair
 java.lang.Object second
          Second field in the Pair
 
Constructor Summary
Pair()
          Creates new Pair object.
Pair(java.lang.Object firstval, java.lang.Object secondval)
          Creates a new Pair object.
 
Method Summary
 java.lang.String toString()
          Get a String representation of this Pair
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

first

public java.lang.Object first
First field in the Pair


second

public java.lang.Object second
Second field in the Pair

Constructor Detail

Pair

public Pair()
Creates new Pair object. Initialises the members to null


Pair

public Pair(java.lang.Object firstval,
            java.lang.Object secondval)
Creates a new Pair object. Initialises the members as specified.

Parameters:
firstval - The value of the first member of the Pair
secondval - The value of the second member of the Pair
Method Detail

toString

public java.lang.String toString()
Get a String representation of this Pair

Overrides:
toString in class java.lang.Object
Returns:
A String