Record Class Pair<L,R>
java.lang.Object
java.lang.Record
com.sure.tool.lang.Pair<L,R>
- Type Parameters:
L- 左值类型R- 右值类型
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.getLeft()取左值。getRight()取右值。final inthashCode()Returns a hash code value for this object.left()Returns the value of theleftrecord component.static <L,R> Pair <L, R> of(L left, R right) 静态工厂。right()Returns the value of therightrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Pair
-
-
Method Details
-
of
静态工厂。- Type Parameters:
L- 左值类型R- 右值类型- Parameters:
left- 左值right- 右值- Returns:
- Pair
-
getLeft
-
getRight
-
toString
-
hashCode
-
equals
Indicates 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). -
left
Returns the value of theleftrecord component.- Returns:
- the value of the
leftrecord component
-
right
Returns the value of therightrecord component.- Returns:
- the value of the
rightrecord component
-