Interface OneOfN.OneOf3Matcher<R,​T1,​T2,​T3>

  • Type Parameters:
    R - Type of the value returned by the mapping function for each case.
    T1 - Type of the left case.
    T2 - Type of the middle case.
    T3 - Type of the right case.
    Enclosing class:
    OneOfN

    public static interface OneOfN.OneOf3Matcher<R,​T1,​T2,​T3>
    A matcher object that contains a handler for each case and can be used to reduce a sum type to a single value. This interface contains a default implementation for each case that simply returns null.
    • Method Detail

      • left

        default R left​(T1 left)
        Parameters:
        left - The value of the left case.
        Returns:
        The mapped value for the left case
      • middle

        default R middle​(T2 middle)
        Parameters:
        middle - The value of the middle case.
        Returns:
        The mapped value for the middle case
      • right

        default R right​(T3 right)
        Parameters:
        right - The value of the right case.
        Returns:
        The mapped value for the right case