|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.util.Pair<T1,T2>
T1
- T2
- public final class Pair<T1,T2>
A generic class for immutable pairs.
Field Summary | |
---|---|
protected T1 |
first
|
protected T2 |
second
|
Constructor Summary | |
---|---|
Pair(T1 a,
T2 b)
Constructor |
Method Summary | ||
---|---|---|
boolean |
equals(Object other)
|
|
T1 |
getFirst()
Return the first element stored in the pair. |
|
T2 |
getSecond()
Return the second element stored in the pair. |
|
int |
hashCode()
|
|
static
|
of(T1 one,
T2 two)
Creates a new instance of the pair encapsulating the supplied values. |
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected T1 first
protected T2 second
Constructor Detail |
---|
public Pair(T1 a, T2 b)
a
- b
- Method Detail |
---|
public T1 getFirst()
public T2 getSecond()
public static <T1,T2> Pair<T1,T2> of(T1 one, T2 two)
T1
- the type of the first element.T2
- the type of the second element.one
- the first valuetwo
- the second value
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |