Record Class Pair<L,R>
java.lang.Object
java.lang.Record
net.flectone.pulse.model.value.Pair<L,R>
- Type Parameters:
L- type of the first valueR- type of the second value- Record Components:
left- the first valueright- the second value
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.getKey()getLeft()getRight()getValue()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) Creates a pair.right()Returns the value of therightrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Pair
-
-
Method Details
-
of
Creates a pair.- Type Parameters:
L- type of the first valueR- type of the second value- Parameters:
left- the first valueright- the second value- Returns:
- the new pair
-
getLeft
- Returns:
- the first value
-
getRight
- Returns:
- the second value
-
getKey
- Returns:
- the first value
-
getValue
- Returns:
- the second value
-
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
-
right
-