de.dfki.mycbr.util
Class Pair<Type1,Type2>

java.lang.Object
  extended by de.dfki.mycbr.util.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 final class Pair<Type1,Type2>
extends java.lang.Object

Utility class to provide pairs of objects.

Author:
myCBR Team

Constructor Summary
Pair(Type1 f, Type2 s)
           
 
Method Summary
 boolean equals(java.lang.Object oth)
           
 Type1 getFirst()
           
 Type2 getSecond()
           
 int hashCode()
           
 void setFirst(Type1 f)
           
 void setSecond(Type2 s)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Pair

public Pair(Type1 f,
            Type2 s)
Parameters:
f - the first element
s - the second element
Method Detail

getFirst

public Type1 getFirst()
Returns:
the first element of this pair

getSecond

public Type2 getSecond()
Returns:
the second element of this pair

setFirst

public void setFirst(Type1 f)
Parameters:
f - the new first element

setSecond

public void setSecond(Type2 s)
Parameters:
s - the new second element

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object oth)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
string representation of this pair