Class Either.Left<L,​R>

  • Type Parameters:
    L - left component type
    R - right component type
    All Implemented Interfaces:
    Iterable<R>, Value<R>, java.io.Serializable, java.lang.Iterable<R>
    Enclosing class:
    Either<L,​R>

    @Deprecated
    public static final class Either.Left<L,​R>
    extends Either<L,​R>
    implements java.io.Serializable
    Deprecated.
    will be removed from the public API
    The Left version of an Either.
    See Also:
    Serialized Form
    • Method Detail

      • get

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

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

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

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

        public boolean equals​(java.lang.Object obj)
        Deprecated.
        Description copied from interface: Value
        Clarifies that values have a proper equals() method implemented.

        See Object.equals(Object).

        Specified by:
        equals in interface Value<L>
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - An object
        Returns:
        true, if this equals o, false otherwise
      • hashCode

        public int hashCode()
        Deprecated.
        Description copied from interface: Value
        Clarifies that values have a proper hashCode() method implemented.

        See Object.hashCode().

        Specified by:
        hashCode in interface Value<L>
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        The hashcode of this object
      • stringPrefix

        public java.lang.String stringPrefix()
        Deprecated.
        Description copied from interface: Value
        Returns the name of this Value type, which is used by toString().
        Specified by:
        stringPrefix in interface Value<L>
        Returns:
        This type name.
      • toString

        public java.lang.String toString()
        Deprecated.
        Description copied from interface: Value
        Clarifies that values have a proper toString() method implemented.

        See Object.toString().

        Specified by:
        toString in interface Value<L>
        Overrides:
        toString in class java.lang.Object
        Returns:
        A String representation of this object