edu.harvard.deas.hyperenc.util
Class Pair<T1,T2>
java.lang.Object
edu.harvard.deas.hyperenc.util.Pair<T1,T2>
- All Implemented Interfaces:
- Serializable
public final class Pair<T1,T2>
- extends Object
- implements Serializable
Represents a pair of objects of different types. Pairs are immutable so long
as the contained objects are immutable.
- Author:
- Jason Juang
- See Also:
- Serialized Form
Pair
public Pair(T1 t1,
T2 t2)
first
public T1 first()
second
public T2 second()
equals
public boolean equals(Object o)
- Returns
true
if both components of this Pair are equal.
- Overrides:
equals
in class Object
- Returns:
true
if both the first and second components of each
Pair are equal according to their equals
methods.
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object