ch.panter.li.bi.util
Class Pair<T1,T2>

java.lang.Object
  extended by ch.panter.li.bi.util.Pair<T1,T2>

public final class Pair<T1,T2>
extends Object

Simple encapsulation of a pair of objects. Comes in handy if a method is required to return more than one object.


Constructor Summary
Pair(T1 first, T2 second)
          Creates a new instance holding the two given objects.
 
Method Summary
 T1 getFirst()
          Access to the first object of the pair.
 T2 getSecond()
          Access to the second object of the pair.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pair

public Pair(T1 first,
            T2 second)
Creates a new instance holding the two given objects.

Parameters:
first - the first object of the pair
second - the second object of the pair
Method Detail

getFirst

public final T1 getFirst()
Access to the first object of the pair.

Returns:
the first object of the pair

getSecond

public final T2 getSecond()
Access to the second object of the pair.

Returns:
the second object of the pair


Copyright 2007-2007 SourceForge. All Rights Reserved.