Package org.apache.hadoop.hbase.util
Class Pair<T1,T2> 
java.lang.Object
org.apache.hadoop.hbase.util.Pair<T1,T2> 
- All Implemented Interfaces:
- Serializable
A generic class for pairs.
- See Also:
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanprivate static booleangetFirst()Return the first element stored in the pair.Return the second element stored in the pair.inthashCode()static <T1,T2> Pair<T1, T2> newPair(T1 a, T2 b) Constructs a new pair, inferring the type via the passed argumentsvoidReplace the first element of the pair.voidReplace the second element of the pair.toString()
- 
Field Details- 
serialVersionUID- See Also:
 
- 
first
- 
second
 
- 
- 
Constructor Details- 
Pairpublic Pair()Default constructor.
- 
PairConstructor- Parameters:
- a- operand
- b- operand
 
 
- 
- 
Method Details- 
newPairConstructs a new pair, inferring the type via the passed arguments- Type Parameters:
- T1- type for first
- T2- type for second
- Parameters:
- a- first element
- b- second element
- Returns:
- a new pair containing the passed arguments
 
- 
setFirstReplace the first element of the pair.- Parameters:
- a- operand
 
- 
setSecondReplace the second element of the pair.- Parameters:
- b- operand
 
- 
getFirstReturn the first element stored in the pair.
- 
getSecondReturn the second element stored in the pair.
- 
equals
- 
equals
- 
hashCode
- 
toString
 
-