Class Either<L,R>

java.lang.Object
org.sonarsource.scanner.lib.internal.util.Either<L,R>

public class Either<L,R> extends Object
  • Constructor Details

    • Either

      protected Either(@Nullable L left, @Nullable R right)
  • Method Details

    • forLeft

      public static <L, R> Either<L,R> forLeft(L left)
    • forRight

      public static <L, R> Either<L,R> forRight(R right)
    • getLeft

      @CheckForNull public L getLeft()
    • getRight

      @CheckForNull public R getRight()
    • isLeft

      public boolean isLeft()
    • isRight

      public boolean isRight()
    • map

      public <T> T map(Function<? super L,? extends T> mapLeft, Function<? super R,? extends T> mapRight)