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.Object
This class implements a simple triple of elements.- Author:
- Matthias Thimm
-
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object obj)
E
getFirst()
returns the first element of this tripleF
getSecond()
returns the second element of this tripleG
getThird()
returns the third element of this tripleint
hashCode()
void
setFirst(E obj1)
sets the first element of this triplevoid
setSecond(F obj2)
sets the second element of this triplevoid
setThird(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:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-