org.decisiondeck.xmcda_oo.utils
Class Pair<Type1,Type2>

java.lang.Object
  extended by org.decisiondeck.xmcda_oo.utils.Pair<Type1,Type2>
Type Parameters:
Type1 - the type of the first element of the pair.
Type2 - the type of the second element of the pair.

public class Pair<Type1,Type2>
extends Object

A simple pair object, holding two other objects, of possibly different types. One or both elements of the pair may be null.

Objects of this type are immutable iff the underlying objects are immutable.


Constructor Summary
Pair(Type1 elt1, Type2 elt2)
           
 
Method Summary
 boolean equals(Object obj)
           
 String getDebugStr()
           
 Type1 getElt1()
           
 Type2 getElt2()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Pair

public Pair(Type1 elt1,
            Type2 elt2)
Method Detail

equals

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

getDebugStr

public String getDebugStr()

getElt1

public Type1 getElt1()
Returns:
the first element of the pair. May be null.

getElt2

public Type2 getElt2()
Returns:
the second element of the pair. May be null.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.