hermes
Class Pair<A,B>

java.lang.Object
  extended by hermes.Pair<A,B>
Type Parameters:
A - the type of the first object in the pair
B - the type of the second object in the pair

public class Pair<A,B>
extends java.lang.Object

Utility for wrapping a pair of objects.


Field Summary
 A first
           
 B second
           
 
Constructor Summary
Pair(A first, B second)
          Creates a Pair with given values for in its first and second fields.
 
Method Summary
 A getFirst()
           
 B getSecond()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

first

public A first

second

public B second
Constructor Detail

Pair

public Pair(A first,
            B second)
Creates a Pair with given values for in its first and second fields.

Parameters:
first - the first object to store
second - the second object to store
Method Detail

getFirst

public A getFirst()
Returns:
the first object in the pair

getSecond

public B getSecond()
Returns:
the second object in the pair