Class Either.Right<L,​R>

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

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

      • Right

        public Right​(R 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​(R 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.Right<L,​R> of​(R right)
        Creates a right value of Either