Class Either.Left<L,R>

java.lang.Object
io.github.resilience4j.core.functions.Either.Left<L,R>
Type Parameters:
L - left component type
R - right component type
All Implemented Interfaces:
Either<L,R>, Serializable
Enclosing interface:
Either<L,R>

public static final class Either.Left<L,R> extends Object implements Either<L,R>, Serializable
The Left version of an Either.
See Also:
  • Method Details

    • get

      public R get()
      Description copied from interface: Either
      Gets the right value if this is a Right or throws if this is a Left.
      Specified by:
      get in interface Either<L,R>
      Returns:
      the right value
    • getLeft

      public L getLeft()
      Description copied from interface: Either
      Returns the left value.
      Specified by:
      getLeft in interface Either<L,R>
      Returns:
      The left value.
    • isLeft

      public boolean isLeft()
      Description copied from interface: Either
      Returns whether this Either is a Left.
      Specified by:
      isLeft in interface Either<L,R>
      Returns:
      true, if this is a Left, false otherwise
    • isRight

      public boolean isRight()
      Description copied from interface: Either
      Returns whether this Either is a Right.
      Specified by:
      isRight in interface Either<L,R>
      Returns:
      true, if this is a Right, false otherwise