net.sf.doolin.util
Class Pair<A,B>

java.lang.Object
  extended by net.sf.doolin.util.Pair<A,B>
Type Parameters:
A - Type of the first element of the pair
B - Type of the second element of the pair

public class Pair<A,B>
extends Object

Immutable association of two objects.

Author:
Damien Coraboeuf

Constructor Summary
Pair(A a, B b)
          Constructor with two values.
 
Method Summary
 boolean equals(Object obj)
           
 A getFirstValue()
           
 B getSecondValue()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Pair

public Pair(A a,
            B b)
Constructor with two values.

Parameters:
a - First value
b - Second value
Method Detail

equals

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

getFirstValue

public A getFirstValue()
Returns:
Returns the firstValue.

getSecondValue

public B getSecondValue()
Returns:
Returns the secondValue.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.