edu.illinois.cs.cogcomp.lbj.coref.util.aux
Class Pair<A,B>

java.lang.Object
  extended by edu.illinois.cs.cogcomp.lbj.coref.util.aux.Pair<A,B>
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
CompPair, SamePair

public class Pair<A,B>
extends java.lang.Object
implements java.io.Serializable

A Pair of objects delegating hashCode and equals to its members. Its members' types need not be the same.

See Also:
Serialized Form

Field Summary
 A a
           
 B b
           
private static long serialVersionUID
           
 
Constructor Summary
Pair()
           
Pair(A _a, B _b)
           
 
Method Summary
static
<S,T> Pair<S,T>
create(S _a, T _b)
           
 boolean equals(java.lang.Object obj)
           
 A getFirst()
           
 B getSecond()
           
 int hashCode()
           
 void setFirst(A first)
           
 void setSecond(B second)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

a

public A a

b

public B b
Constructor Detail

Pair

public Pair()

Pair

public Pair(A _a,
            B _b)
Method Detail

create

public static <S,T> Pair<S,T> create(S _a,
                                     T _b)

getFirst

public A getFirst()

getSecond

public B getSecond()

setFirst

public void setFirst(A first)

setSecond

public void setSecond(B second)

equals

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

hashCode

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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object