Class Either.Left<L,​R>

  • Type Parameters:
    L - the type of Left
    R - the type of Right
    Enclosing class:
    Either<L,​R>

    public static class Either.Left<L,​R>
    extends Either<L,​R>
    A left value of Either
    • Constructor Detail

      • Left

        public Left​(L value)
    • Method Detail

      • left

        public L left()
        Description copied from class: Either
        Retrieve the Left value of Either.
        Specified by:
        left in class Either<L,​R>
        Returns:
        the Left value
      • right

        public R right()
        Description copied from class: Either
        Retrieve the Right value of Either.
        Specified by:
        right in class Either<L,​R>
        Returns:
        the Right value
      • setValue

        public void setValue​(L value)
        Sets the encapsulated value to another value
        Parameters:
        value - the new value of the encapsulated value
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • of

        public static <L,​R> Either.Left<L,​R> of​(L left)
        Creates a left value of Either