A - Type of value 1B - Type of value 2public class Pair<A,B> extends Object implements Serializable
| 限定符和类型 | 字段和说明 |
|---|---|
A |
first
The first element of the pair; see also
getFirst(). |
B |
second
The second element of the pair; see also
getSecond(). |
| 构造器和说明 |
|---|
Pair(A first,
B second)
Pair constructor
|
Pair(Pair<? extends A,? extends B> pair)
Copy constructor
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object o)
NOTE: Not safe to override this method, hence final.
|
A |
getFirst()
Returns the first element of this pair; see also
first. |
B |
getSecond()
Returns the second element of this pair; see also
second. |
int |
hashCode()
NOTE: Not safe to override this method, hence final.
|
static <A,B> Pair<A,B> |
of(A a,
B b)
Static constructor to save typing on generic arguments.
|
String |
toString() |
public final A first
getFirst().public final B second
getSecond().Copyright © 2013. All Rights Reserved.