|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.omnaest.utils.tuple.Tuple2<T1,T2>
public class Tuple2<T1,T2>
Two arguments Tuple supporting hashCode(), equals(Object) and toString() using the values of
the given elements.
Tuple,
Tuple3,
Serialized Form| Field Summary | |
|---|---|
protected T1 |
valueFirst
|
protected T2 |
valueSecond
|
| Constructor Summary | |
|---|---|
Tuple2()
|
|
Tuple2(T1 valueFirst,
T2 valueSecond)
|
|
Tuple2(Tuple2<T1,T2> tuple2)
Creates a new Tuple2 instance based on the values of an already existing instance |
|
| Method Summary | |
|---|---|
Map<T1,T2> |
asMap()
Returns a Map containing an entry based on this Tuple. |
boolean |
equals(Object obj)
|
T1 |
getValueFirst()
Returns the first value of the Tuple. |
T2 |
getValueSecond()
Returns the second value of the Tuple. |
int |
hashCode()
|
Tuple2<T2,T1> |
newInvertedInstance()
Returns a new Tuple2 instance with inverted first and second value |
void |
setValueFirst(T1 valueFirst)
Sets the first value of the Tuple. |
void |
setValueSecond(T2 valueSecond)
Sets the second value of the Tuple. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected T1 valueFirst
protected T2 valueSecond
| Constructor Detail |
|---|
public Tuple2()
Tuple2
public Tuple2(T1 valueFirst,
T2 valueSecond)
valueFirst - valueSecond - Tuple2public Tuple2(Tuple2<T1,T2> tuple2)
Tuple2 instance based on the values of an already existing instance
tuple2 - Tuple2| Method Detail |
|---|
public Tuple2<T2,T1> newInvertedInstance()
Tuple2 instance with inverted first and second value
Tuple2public T1 getValueFirst()
Tuple.
public void setValueFirst(T1 valueFirst)
Tuple.
valueFirst - public T2 getValueSecond()
Tuple.
public void setValueSecond(T2 valueSecond)
Tuple.
valueSecond - public Map<T1,T2> asMap()
Map containing an entry based on this Tuple.
public String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||