Package software.amazon.smithy.utils
Class Pair<L,R>
java.lang.Object
software.amazon.smithy.utils.Pair<L,R>
- Type Parameters:
L
- Left value type.R
- Right value type.
- All Implemented Interfaces:
Map.Entry<L,
R>
Generic immutable pair of values.
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
left
-
right
-
-
Constructor Details
-
Pair
-
-
Method Details
-
of
Creates a Pair from the given values.- Type Parameters:
L
- Left value type.R
- Right value type.- Parameters:
left
- Left value.right
- Right value.- Returns:
- Returns the created Pair.
-
flatMapStream
- Type Parameters:
L
- Left value type.R
- Right value type.- Parameters:
left
- Value to set as the left side of the pair.f
- Mapping function that accepts the left value and returns an Optional value.- Returns:
- Returns a Stream that contains either a single Pair if the Optional is not empty, or an empty Stream.
-
flatMapStream
-
getLeft
-
getRight
-
getKey
-
getValue
-
setValue
-
toString
-
equals
-
hashCode
public int hashCode()
-