Class/Object

cats.data

Ior

Related Docs: object Ior | package data

Permalink

sealed abstract class Ior[+A, +B] extends Product with Serializable

Represents a right-biased disjunction that is either an A, or a B, or both an A and a B.

An instance of A Ior B is one of:

A Ior B is similar to scala.util.Either[A, B], except that it can represent the simultaneous presence of an A and a B. It is right-biased so methods such as map and flatMap operate on the B value. Some methods, like flatMap, handle the presence of two Both values using a Semigroup[A], while other methods, like toEither, ignore the A value in a Both.

A Ior B is isomorphic to Either[Either[A, B], (A, B)], but provides methods biased toward B values, regardless of whether the B values appear in a Right or a Both. The isomorphic scala.util.Either form can be accessed via the unwrap method.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Ior
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def canEqual(that: Any): Boolean

    Permalink
    Definition Classes
    Equals
  2. abstract def productArity: Int

    Permalink
    Definition Classes
    Product
  3. abstract def productElement(n: Int): Any

    Permalink
    Definition Classes
    Product

Concrete Value Members

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def ===[AA >: A, BB >: B](that: Ior[AA, BB])(implicit AA: Eq[AA], BB: Eq[BB]): Boolean

    Permalink
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. final def bimap[C, D](fa: (A) ⇒ C, fb: (B) ⇒ D): Ior[C, D]

    Permalink
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def combine[AA >: A, BB >: B](that: Ior[AA, BB])(implicit AA: Semigroup[AA], BB: Semigroup[BB]): Ior[AA, BB]

    Permalink
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def exists(p: (B) ⇒ Boolean): Boolean

    Permalink
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def flatMap[AA >: A, D](f: (B) ⇒ Ior[AA, D])(implicit AA: Semigroup[AA]): Ior[AA, D]

    Permalink
  14. final def fold[C](fa: (A) ⇒ C, fb: (B) ⇒ C, fab: (A, B) ⇒ C): C

    Permalink
  15. final def foldLeft[C](c: C)(f: (C, B) ⇒ C): C

    Permalink
  16. final def foldRight[C](lc: Eval[C])(f: (B, Eval[C]) ⇒ Eval[C]): Eval[C]

    Permalink
  17. final def forall(p: (B) ⇒ Boolean): Boolean

    Permalink
  18. final def foreach(f: (B) ⇒ Unit): Unit

    Permalink
  19. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  20. final def getOrElse[BB >: B](bb: ⇒ BB): BB

    Permalink
  21. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def isBoth: Boolean

    Permalink
  23. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. final def isLeft: Boolean

    Permalink
  25. final def isRight: Boolean

    Permalink
  26. final def left: Option[A]

    Permalink
  27. final def leftMap[C](f: (A) ⇒ C): Ior[C, B]

    Permalink
  28. final def map[D](f: (B) ⇒ D): Ior[A, D]

    Permalink
  29. final def merge[AA >: A](implicit ev: <:<[B, AA], AA: Semigroup[AA]): AA

    Permalink
  30. final def mergeLeft[AA >: A](implicit ev: <:<[B, AA]): AA

    Permalink
  31. final def mergeRight[AA >: A](implicit ev: <:<[B, AA]): AA

    Permalink
  32. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  33. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  34. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  35. final def onlyBoth: Option[(A, B)]

    Permalink
  36. final def onlyLeft: Option[A]

    Permalink
  37. final def onlyLeftOrRight: Option[Either[A, B]]

    Permalink
  38. final def onlyRight: Option[B]

    Permalink
  39. final def pad: (Option[A], Option[B])

    Permalink
  40. def productIterator: Iterator[Any]

    Permalink
    Definition Classes
    Product
  41. def productPrefix: String

    Permalink
    Definition Classes
    Product
  42. final def putLeft[C](left: C): Ior[C, B]

    Permalink
  43. final def putRight[C](right: C): Ior[A, C]

    Permalink
  44. final def right: Option[B]

    Permalink
  45. final def show[AA >: A, BB >: B](implicit AA: Show[AA], BB: Show[BB]): String

    Permalink
  46. final def swap: Ior[B, A]

    Permalink
  47. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  48. final def to[F[_], BB >: B](implicit F: Alternative[F]): F[BB]

    Permalink
  49. final def toEither: Either[A, B]

    Permalink
  50. final def toIorNec[AA >: A]: IorNec[AA, B]

    Permalink
  51. final def toIorNel[AA >: A]: IorNel[AA, B]

    Permalink
  52. final def toIorNes[AA >: A](implicit O: Order[AA]): IorNes[AA, B]

    Permalink
  53. final def toList: List[B]

    Permalink
  54. final def toOption: Option[B]

    Permalink
  55. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  56. final def toValidated: Validated[A, B]

    Permalink
  57. final def traverse[F[_], AA >: A, D](g: (B) ⇒ F[D])(implicit F: Applicative[F]): F[Ior[AA, D]]

    Permalink
  58. final def unwrap: Either[Either[A, B], (A, B)]

    Permalink
  59. final def valueOr[BB >: B](f: (A) ⇒ BB)(implicit BB: Semigroup[BB]): BB

    Permalink
  60. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  61. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  62. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped