|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.infai.emo.matcher.util.Tuple<F,S>
F
- the classtype of which the first element has to be.S
- the classtype of which the second element has to be.public class Tuple<F,S>
This class contains a pair of elements that have any kind of relation.
Field Summary | |
---|---|
(package private) F |
firstElement
The first element of the tuple. |
(package private) S |
secondElement
The second element of the tuple. |
Constructor Summary | |
---|---|
Tuple(F firstElement,
S secondElement)
The constructor that creates a new tuple from two the given elements. |
Method Summary | |
---|---|
boolean |
equals(Tuple<F,S> t)
Method for comparing a tuple with another one by comparing their elements. |
F |
getFirstElement()
|
S |
getSecondElement()
|
Tuple |
invert()
Method inverts the tuple by switching the position of its elements. |
void |
setFirstElement(F firstElement)
Set a new element to the first position of the tuple. |
void |
setSecondElement(S secondElement)
Set a new element to the second position of the tuple. |
void |
setValues(F firstElement,
S secondElement)
Replaces both elements of the tuple by the given ones. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
F firstElement
S secondElement
Constructor Detail |
---|
public Tuple(F firstElement, S secondElement)
firstElement
- the fist element of the tuple.secondElement
- the second element of the tuple.Method Detail |
---|
public Tuple invert()
public boolean equals(Tuple<F,S> t)
t
- the tuple to compare with.
public java.lang.String toString()
toString
in class java.lang.Object
public F getFirstElement()
public void setFirstElement(F firstElement)
firstElement
- the new first element.public S getSecondElement()
public void setSecondElement(S secondElement)
secondElement
- the new second element.public void setValues(F firstElement, S secondElement)
firstElement
- the new first element.secondElement
- the new second element.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |