Packages

trait Either[L, R] extends Serializable

Linear Supertypes
Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Either
  2. Serializable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def get(): R

    Gets the right value if this is a Right or throws if this is a Left.

    Gets the right value if this is a Right or throws if this is a Left.

    Throws NoSuchElementException if this is a Left.

    returns

    the right value

  2. abstract def getLeft(): L

    Returns the left value.

    Returns the left value.

    Throws NoSuchElementException if this is a Right.

    returns

    The left value.

  3. abstract def isLeft(): Boolean

    Returns whether this Either is a Left.

    Returns whether this Either is a Left.

    returns

    true, if this is a Left, false otherwise

  4. abstract def isRight(): Boolean

    Returns whether this Either is a Right.

    Returns whether this Either is a Right.

    returns

    true, if this is a Right, false otherwise

  5. abstract def stringPrefix(): String

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. def map[U](mapper: Function[_ >: R, _ <: U]): Either[L, U]

    Maps the value of this Either if it is a Right, performs no operation if this is a Left.

    Maps the value of this Either if it is a Right, performs no operation if this is a Left.

    
    import static io.vavr.API.*;
    
    // = Right("A")
    Right("a").map(String::toUpperCase);
    
    // = Left(1)
    Left(1).map(String::toUpperCase);
    
    

    Throws NullPointerException if mapper is null.

    mapper

    A mapper

    returns

    a mapped Monad

    Annotations
    @SuppressWarnings()
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  17. def toString(): String
    Definition Classes
    AnyRef → Any
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped