Pair (AWS SDK for Java

Pair (AWS SDK for Java - 2.25.23)
Type Parameters:
LeftT - Left type
RightT - Right Type

public final class Pair<LeftT,RightT>extends Object

Simple struct of two values, possibly of different types.

  • Method Summary

    <ReturnT> ReturnT

    Apply the function to both the left and right values and return the transformed result.

    boolean

    int

    static <LeftT,RightT>
    Pair<LeftT,RightT>
    of(LeftT left, RightT right)
  • Method Details

    • left

      Returns:
      Left value
    • right

      Returns:
      Right value
    • apply

      Apply the function to both the left and right values and return the transformed result.

      Type Parameters:
      ReturnT - Transformed return type of BiFunction.
      Parameters:
      function - Function to apply on the Pair
      Returns:
      Result of BiFunction applied on left and right values of the pair.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()

      Overrides:
      hashCode in class Object
    • toString

      Overrides:
      toString in class Object
    • of

      public static <LeftT,RightT> Pair<LeftT,RightT> of(LeftT left, RightT right)

You Might Also Like