ABL4J (Alignment Based Learning for Java) - 0.9.7

org.schwiebert.abl4j.util
Class Pair<A,B>

java.lang.Object
  extended by 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

Field Summary
 A first
           
 B second
           
private static long serialVersionUID
           
 
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()
           
 
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

first

public A first

second

public B second
Constructor Detail

Pair

public Pair(A a,
            B b)
Method Detail

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)

ABL4J (Alignment Based Learning for Java) - 0.9.7

© 2007 Stephan Schwiebert