|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbcds.tools.SimplePair<T1,T2>
public class SimplePair<T1,T2>
SimplePair implements a two-component tuple. The components can be of arbitrary types.
| Field Summary | |
|---|---|
T1 |
first
The first component. |
T2 |
second
The second component. |
| Constructor Summary | |
|---|---|
SimplePair(T1 v1,
T2 v2)
Creates a new tuple with the given values. |
|
| Method Summary | ||
|---|---|---|
boolean |
equals(java.lang.Object b)
Returns true if b a this tuple are instances of
the same class and their respective components are also
equal. |
|
T1 |
getFirst()
Returns the tuple's first component. |
|
T2 |
getSecond()
Returns the tuple's second component. |
|
int |
hashCode()
Returns this tuple's hash code. |
|
static
|
make(T1 v1,
T2 v2)
Convenience "factory" method. |
|
java.lang.String |
toString()
Returns a string of the form "(v1, v2)", where v1 and v2 stand for what toString returns for the two tuple components. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final T1 first
public final T2 second
| Constructor Detail |
|---|
public SimplePair(T1 v1,
T2 v2)
| Method Detail |
|---|
public static <T1,T2> SimplePair<T1,T2> make(T1 v1,
T2 v2)
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object b)
b a this tuple are instances of
the same class and their respective components are also
equal.
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic T1 getFirst()
public T2 getSecond()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||