Packages

sealed trait EOr[+A] extends AnyRef

A container that can either be a Failure containing an E or Success containing a value, semantically a combination of Either and Try but specialized for E

A

Type of the value this EOr can contain

Self Type
EOr[A]
See also

e.scala.E

_root_.scala.util.Either

_root_.scala.util.Try

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EOr
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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. def andThen[B](next: => EOr[B]): EOr[B]

    Provides a next EOr if this one has a value, ignoring the value

    Provides a next EOr if this one has a value, ignoring the value

    B

    Type of value in next EOr

    next

    Next EOr in case this one has a value

    returns

    Next EOr or a new EOr containing E in this one

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. val error: Option[E]

    E in this as an Option

  10. def filter(condition: (A) => Boolean, filteredError: (A) => E = a => EOr.filteredError.data("value", a)): EOr[A]

    Filters this EOr by value in it, if it exists, using given function

    Filters this EOr by value in it, if it exists, using given function

    condition

    Filtering function

    filteredError

    E conversion function

    returns

    This EOr of a new EOr containing an E computed by given conversion function

  11. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  12. def flatMap[B](f: (A) => EOr[B]): EOr[B]

    Computes a new EOr using value in this, if it exists, with given flat mapping function

    Computes a new EOr using value in this, if it exists, with given flat mapping function

    B

    Type of the new value

    f

    Flat mapping function

    returns

    Computed EOr or a new EOr containing E in this one

  13. def flatMapError[AA >: A](f: (E) => EOr[AA]): EOr[AA]

    Computes a new EOr using E in this, if it exists, with given flat mapping function

    Computes a new EOr using E in this, if it exists, with given flat mapping function

    AA

    Type of the new value

    f

    E flat mapping function

    returns

    This EOr or a computed EOr if this one has E

  14. def fold[B](ifFailure: (E) => B, ifSuccess: (A) => B): B

    Folds this into a single value, handling both E and value conversions with given functions

    Folds this into a single value, handling both E and value conversions with given functions

    B

    Type of the desired result

    ifFailure

    Conversion function for E

    ifSuccess

    Conversion function for value

    returns

    Converted result

  15. def foreach[U](f: (A) => U): Unit

    Alias of onValue

    Alias of onValue

    See also

    e.scala.EOr#onValue

  16. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. def getOrElse[AA >: A](default: => AA): AA

    Gets the value in this or falls back to given default value

    Gets the value in this or falls back to given default value

    AA

    Type of default value

    default

    Default value to use in case this has E

    returns

    Value in this or given default value

  18. def handle[AA >: A](f: PartialFunction[E, AA]): EOr[AA]

    Handles E in this EOr, if it exists, by given partial function to compute a successful EOr

    Handles E in this EOr, if it exists, by given partial function to compute a successful EOr

    AA

    Type of value returned by partial function

    f

    Partial function to handle E

    returns

    A new EOr containing handled value if partial function was defined for E in this EOr or this EOr as is

  19. def handleWith[AA >: A](f: PartialFunction[E, EOr[AA]]): EOr[AA]

    Handles E in this EOr, if it exists, by given partial function to compute a new EOr

    Handles E in this EOr, if it exists, by given partial function to compute a new EOr

    AA

    Type of value in EOr returned by partial function

    f

    Partial function to compute new EOr

    returns

    Computed new EOr if partial function was defined for E in this EOr or this EOr as is

  20. val hasError: Boolean

    Whether or not this contains an E

  21. val hasValue: Boolean

    Whether or not this contains a value

  22. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  23. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  24. def map[B](f: (A) => B): EOr[B]

    Converts value in this, if it exists, using given mapping function to make a new EOr

    Converts value in this, if it exists, using given mapping function to make a new EOr

    B

    Type of the new value

    f

    Mapping function

    returns

    A new EOr containing either the new value or E in this one

  25. def mapError(f: (E) => E): EOr[A]

    Converts E in this, if it exists, using given mapping function to make a new EOr

    Converts E in this, if it exists, using given mapping function to make a new EOr

    f

    E mapping function

    returns

    This EOr or a new EOr containing computed E if this one has E

  26. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  28. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. def onError[U](f: (E) => U): EOr[A]

    Performs a side-effect using error in this, if it exists

    Performs a side-effect using error in this, if it exists

    U

    Type of result of the side-effect

    f

    Side-effecting function

  30. def onValue[U](f: (A) => U): EOr[A]

    Performs a side-effect using value in this, if it exists

    Performs a side-effect using value in this, if it exists

    U

    Type of result of the side-effect

    f

    Side-effecting function

  31. def orElse[AA >: A](alternative: => EOr[AA]): EOr[AA]

    Provides an alternative EOr if this one has E, ignoring the E

    Provides an alternative EOr if this one has E, ignoring the E

    AA

    Type of value in alternative EOr

    alternative

    Alternative EOr in case this one has E

    returns

    This EOr or alternative if this one has E

  32. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  33. def toString(): String
    Definition Classes
    AnyRef → Any
  34. val value: Option[A]

    Value in this as an Option

  35. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  36. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  37. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  38. def withFilter(condition: (A) => Boolean): EOr[A]

    Filters this EOr by value in it, if it exists, using given function

    Filters this EOr by value in it, if it exists, using given function

    condition

    Filtering function

    returns

    This EOr of a new EOr containing filtered error

    See also

    e.scala.EOr#filteredError

Inherited from AnyRef

Inherited from Any

Ungrouped