Package net.sf.tweety.commons.util
Class Triple<E,F,G>
- java.lang.Object
-
- net.sf.tweety.commons.util.Triple<E,F,G>
-
- Type Parameters:
E- the type of the first elementF- the type of the second elementG- the type of the third element
public class Triple<E,F,G> extends java.lang.ObjectThis class implements a simple triple of elements.- Author:
- Matthias Thimm
-
-
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object obj)EgetFirst()returns the first element of this tripleFgetSecond()returns the second element of this tripleGgetThird()returns the third element of this tripleinthashCode()voidsetFirst(E obj1)sets the first element of this triplevoidsetSecond(F obj2)sets the second element of this triplevoidsetThird(G obj3)sets the third element of this triple
-
-
-
Constructor Detail
-
Triple
public Triple(E obj1, F obj2, G obj3)
Initializes the elements of this triple with the given parameters- Parameters:
obj1- the first element of this tripleobj2- the second element of this tripleobj3- the third element of this triple
-
Triple
public Triple()
Initializes an empty triple.
-
-
Method Detail
-
getFirst
public E getFirst()
returns the first element of this triple- Returns:
- the first element of this triple
-
setFirst
public void setFirst(E obj1)
sets the first element of this triple- Parameters:
obj1- an object of type E
-
getSecond
public F getSecond()
returns the second element of this triple- Returns:
- the second element of this triple
-
setSecond
public void setSecond(F obj2)
sets the second element of this triple- Parameters:
obj2- an object of type F
-
getThird
public G getThird()
returns the third element of this triple- Returns:
- the third element of this triple
-
setThird
public void setThird(G obj3)
sets the third element of this triple- Parameters:
obj3- an object of type G
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-