org.schwiebert.abl4j.util
Class Pair<A,B>
java.lang.Object
org.schwiebert.abl4j.util.Pair<A,B>
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- AllAlignment.Link, Phrase, Range
public class Pair<A,B>
- extends Object
- implements Serializable
Helper class that represents a pair of two Objects.
- Author:
- Stephan Schwiebert (sschwieb@spinfo.uni-koeln.de)
- See Also:
- Serialized Form
|
Constructor Summary |
Pair(A a,
B b)
|
|
Method Summary |
boolean |
equals(Object obj)
Returns true if this.first equals obj.first and
this.second equals obj.second. |
int |
hashCode()
Returns a hashCode generated from first and second |
void |
setValues(A a,
B b)
|
String |
toString()
|
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
first
public A first
second
public B second
Pair
public Pair(A a,
B b)
equals
public boolean equals(Object obj)
- Returns
true if this.first equals obj.first and
this.second equals obj.second.
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Returns a hashCode generated from first and second
- Overrides:
hashCode in class Object
toString
public String toString()
- Overrides:
toString in class Object
setValues
public void setValues(A a,
B b)
© 2007 Stephan Schwiebert