Interface Either<A,B>

All Known Implementing Classes:
Either.Left, Either.Right

public sealed interface Either<A,B> permits Either.Left<A,B>, Either.Right<A,B>
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
     
    static final record 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
     
    default boolean
     
     
    static <A, B> Either<A,B>
    left(A value)
     
     
    static <A, B> Either<A,B>
    right(B value)
     
  • Method Details

    • left

      @Nullable A left()
    • right

      @Nullable B right()
    • isLeft

      default boolean isLeft()
    • isRight

      default boolean isRight()
    • left

      static <A, B> Either<A,B> left(A value)
    • right

      static <A, B> Either<A,B> right(B value)