ostore.util
Class Pair

java.lang.Object
  |
  +--ostore.util.Pair

public final class Pair
extends Object

To avoid making a whole bunch of two member classes.

Version:
$Id: Pair.java,v 1.9 2002/03/27 19:00:51 hweather Exp $
Author:
Sean C. Rhea

Field Summary
 Object first
           
 Object second
           
 
Constructor Summary
Pair()
          Default constructor
Pair(Object f, Object s)
          Constructor
 
Method Summary
 boolean equals(Object other)
           
 Object first()
          Returns the first element of the pair.
 int hashCode()
           
 Object second()
          Returns the second element of the pair.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

first

public Object first

second

public Object second
Constructor Detail

Pair

public Pair()
Default constructor


Pair

public Pair(Object f,
            Object s)
Constructor

Parameters:
f - == first object of the pair
s - == second object of the pair
Method Detail

first

public final Object first()
Returns the first element of the pair.

Returns:
The first element of the pair.

second

public final Object second()
Returns the second element of the pair.

Returns:
The second element of the pair.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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

toString

public String toString()
Overrides:
toString in class Object