Class Pair<T,U>

java.lang.Object
  extended by Pair<T,U>

public class Pair<T,U>
extends Object

A class to represent two values.

Version:
2008.Dec.06
Author:
Lew, snagged from http://groups.google.com/group/comp.lang.java.help/browse_thread/thread/f8b63fc645c1b487/1d94be050cfc249b minimally touched up by Ian Barland.

Constructor Summary
Pair(T f, U s)
           
 
Method Summary
 boolean equals(Object that)
           
 T getFirst()
          Return The first value of this pair.
 U getSecond()
          Return The second value of this pair.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pair

public Pair(T f,
            U s)
Method Detail

equals

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

getFirst

public T getFirst()
Return The first value of this pair.

Returns:
The first value of this pair.

getSecond

public U getSecond()
Return The second value of this pair.

Returns:
The second value of this pair.

hashCode

public int hashCode()
Overrides:
hashCode in class Object