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 A Xor B, except that it can represent the simultaneous presence of an A and a B. It is right-biased like Xor, 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 toXor, ignore the A value in a Both.

A Ior B is isomorphic to (A Xor B) Xor (A, B), but provides methods biased toward B values, regardless of whether the B values appear in a Right or a Both. The isomorphic Xor 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 append[AA >: A, BB >: B](that: Ior[AA, BB])(implicit AA: Semigroup[AA], BB: Semigroup[BB]): Ior[AA, BB]

    Permalink
  6. final def asInstanceOf[T0]: T0

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

    Permalink
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  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 ne(arg0: AnyRef): Boolean

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

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

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

    Permalink
  34. final def onlyLeft: Option[A]

    Permalink
  35. final def onlyLeftOrRight: Option[Xor[A, B]]

    Permalink
  36. final def onlyRight: Option[B]

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

    Permalink
  38. def productIterator: Iterator[Any]

    Permalink
    Definition Classes
    Product
  39. def productPrefix: String

    Permalink
    Definition Classes
    Product
  40. final def right: Option[B]

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

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

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

    Permalink
    Definition Classes
    AnyRef
  44. final def to[F[_], BB >: B](implicit monoidKF: MonoidK[F], applicativeF: Applicative[F]): F[BB]

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

    Permalink
  46. final def toList: List[B]

    Permalink
  47. final def toOption: Option[B]

    Permalink
  48. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  49. final def toXor: Xor[A, B]

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

    Permalink
  51. final def unwrap: Xor[Xor[A, B], (A, B)]

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

    Permalink
  53. final def wait(): Unit

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  55. 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