Class

cats.syntax

EitherObjectOps

Related Doc: package syntax

Permalink

final class EitherObjectOps extends AnyVal

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EitherObjectOps
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new EitherObjectOps(either: Either.type)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def catchNonFatal[A](f: ⇒ A): Either[Throwable, A]

    Permalink
  6. def catchOnly[T >: Null <: Throwable]: CatchOnlyPartiallyApplied[T]

    Permalink

    Evaluates the specified block, catching exceptions of the specified type and returning them on the left side of the resulting Either.

    Evaluates the specified block, catching exceptions of the specified type and returning them on the left side of the resulting Either. Uncaught exceptions are propagated.

    For example:

    scala> import cats.implicits._ // get syntax for Either
    scala> Either.catchOnly[NumberFormatException] { "foo".toInt }
    res0: Either[NumberFormatException, Int] = Left(java.lang.NumberFormatException: For input string: "foo")
  7. val either: Either.type

    Permalink
  8. def fromOption[A, B](o: Option[B], ifNone: ⇒ A): Either[A, B]

    Permalink

    Converts an Option[B] to an Either[A, B], where the provided ifNone values is returned on the left of the Either when the specified Option is None.

  9. def fromTry[A](t: Try[A]): Either[Throwable, A]

    Permalink

    Converts a Try[A] to a Either[Throwable, A].

  10. def getClass(): Class[_ <: AnyVal]

    Permalink
    Definition Classes
    AnyVal → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. def left[A, B](a: A): Either[A, B]

    Permalink
  13. def right[A, B](b: B): Either[A, B]

    Permalink
  14. def toString(): String

    Permalink
    Definition Classes
    Any

Inherited from AnyVal

Inherited from Any

Ungrouped