Class Either.Left<L,R>

java.lang.Object
de.marcely.bedwars.tools.Either.Left<L,R>
All Implemented Interfaces:
Either<L,R>
Enclosing interface:
Either<L,R>

public static class Either.Left<L,R> extends Object implements Either<L,R>
  • Constructor Details

    • Left

      public Left(L entry)
  • Method Details

    • hasLeft

      public boolean hasLeft()
      Description copied from interface: Either
      Returns if something has been set to the left field.

      Either.hasRight() will return false if this method returns true

      Specified by:
      hasLeft in interface Either<L,R>
      Returns:
      true if this is a left value, false if this is a right value
    • hasRight

      public boolean hasRight()
      Description copied from interface: Either
      Returns if something has been set to the right field.

      Either.hasLeft() will return false if this method returns true

      Specified by:
      hasRight in interface Either<L,R>
      Returns:
      true if this is a right value, false if this is a left value
    • left

      public L left()
      Description copied from interface: Either
      Retrieve the left value.

      May return null even when Either.hasLeft() returns true. Also returns null if this is a right value.

      Specified by:
      left in interface Either<L,R>
      Returns:
      The set left value
    • right

      public R right()
      Description copied from interface: Either
      Retrieve the right value.

      May return null even when Either.hasRight() returns true. Also returns null if this is a left value.

      Specified by:
      right in interface Either<L,R>
      Returns:
      The set right value