de.dfki.mycbr.util
Class Pair<Type1,Type2>
java.lang.Object
de.dfki.mycbr.util.Pair<Type1,Type2>
- Type Parameters:
Type1 - the type of the first element of the pairType2 - 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
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Pair
public Pair(Type1 f,
Type2 s)
- Parameters:
f - the first elements - the second element
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