Package org.apache.spark.util
Record Class Pair<L,R> 
An immutable pair of values. Note that the fields are intentionally designed to be `getLeft` and
 `getRight` instead of `left` and `right` in order to mitigate the migration burden
 from `org.apache.commons.lang3.tuple.Pair`.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.getLeft()Returns the value of thegetLeftrecord component.getRight()Returns the value of thegetRightrecord component.final inthashCode()Returns a hash code value for this object.static <L,R> Pair<L, R> of(L left, R right) final StringtoString()Returns a string representation of this record class.
- 
Constructor Details- 
PairCreates an instance of aPairrecord class.- Parameters:
- getLeft- the value for the- getLeftrecord component
- getRight- the value for the- getRightrecord component
 
 
- 
- 
Method Details- 
of
- 
toStringReturns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
- 
hashCodepublic final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
- 
equalsIndicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object).
- 
getLeftReturns the value of thegetLeftrecord component.- Returns:
- the value of the getLeftrecord component
 
- 
getRightReturns the value of thegetRightrecord component.- Returns:
- the value of the getRightrecord component
 
 
-