E
- the type of the first elementF
- the type of the second elementG
- the type of the third elementpublic class Triple<E,F,G>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) E |
obj1
The first element of this triple
|
(package private) F |
obj2
The second element of this triple
|
(package private) G |
obj3
The third element of this triple
|
Constructor and Description |
---|
Triple()
Initializes an empty triple.
|
Triple(E obj1,
F obj2,
G obj3)
Initializes the elements of this triple with the given parameters
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
E |
getFirst()
returns the first element of this triple
|
F |
getSecond()
returns the second element of this triple
|
G |
getThird()
returns the third element of this triple
|
int |
hashCode() |
void |
setFirst(E obj1)
sets the first element of this triple
|
void |
setSecond(F obj2)
sets the second element of this triple
|
void |
setThird(G obj3)
sets the third element of this triple
|
E obj1
F obj2
G obj3
public Triple(E obj1, F obj2, G obj3)
obj1
- the first element of this tripleobj2
- the second element of this tripleobj3
- the third element of this triplepublic Triple()
public E getFirst()
public void setFirst(E obj1)
obj1
- an object of type Epublic F getSecond()
public void setSecond(F obj2)
obj2
- an object of type Fpublic G getThird()
public void setThird(G obj3)
obj3
- an object of type Gpublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object