|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavatools.datatypes.Pair<F,S>
public class Pair<F,S>
This class is part of the Java Tools (see http://mpii.de/yago-naga/javatools). It is licensed under the Creative Commons Attribution License (see http://creativecommons.org/licenses/by/3.0) by the YAGO-NAGA team (see http://mpii.de/yago-naga). This class provides the simple datatype of a pair
Field Summary | |
---|---|
F |
first
Holds the first component |
S |
second
Holds the second component |
Constructor Summary | |
---|---|
Pair()
Constructs an empty pair |
|
Pair(F first,
S second)
Constructs a Pair |
Method Summary | |
---|---|
int |
compareTo(Pair<F,S> o)
|
boolean |
equals(java.lang.Object obj)
|
F |
first()
Returns the first |
int |
hashCode()
|
S |
second()
Returns the second |
void |
setFirst(F first)
Sets the first |
void |
setSecond(S second)
Sets the second |
java.lang.String |
toString()
Returns "first/second" |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public F first
public S second
Constructor Detail |
---|
public Pair(F first, S second)
public Pair()
Method Detail |
---|
public F first()
public void setFirst(F first)
public S second()
public void setSecond(S second)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(Pair<F,S> o)
compareTo
in interface java.lang.Comparable<Pair<F,S>>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |