Class/Object

cats.data

Validated

Related Docs: object Validated | package data

Permalink

sealed abstract class Validated[+E, +A] extends Product with Serializable

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Validated
  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. def ===[EE >: E, AA >: A](that: Validated[EE, AA])(implicit EE: Eq[EE], AA: Eq[AA]): Boolean

    Permalink
  5. def ap[EE >: E, B](f: Validated[EE, (A) ⇒ B])(implicit EE: Semigroup[EE]): Validated[EE, B]

    Permalink

    From Apply: if both the function and this value are Valid, apply the function

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def bimap[EE, AA](fe: (E) ⇒ EE, fa: (A) ⇒ AA): Validated[EE, AA]

    Permalink

    Validated is a functor.Bifunctor, this method applies one of the given functions.

  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def compare[EE >: E, AA >: A](that: Validated[EE, AA])(implicit EE: Order[EE], AA: Order[AA]): Int

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. def exists(predicate: (A) ⇒ Boolean): Boolean

    Permalink

    Is this Valid and matching the given predicate

  13. def filter[EE >: E](pred: (A) ⇒ Boolean)(implicit M: Monoid[EE]): Validated[EE, A]

    Permalink

    If the value is Valid but the predicate fails, return an empty Invalid value, otherwise leaves the value unchanged.

    If the value is Valid but the predicate fails, return an empty Invalid value, otherwise leaves the value unchanged. This method is mostly useful for allowing validated values to be used in a for comprehension with pattern matching.

  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def fold[B](fe: (E) ⇒ B, fa: (A) ⇒ B): B

    Permalink
  16. def foldLeft[B](b: B)(f: (B, A) ⇒ B): B

    Permalink

    apply the given function to the value with the given B when valid, otherwise return the given B

  17. def foldRight[B](lb: Eval[B])(f: (A, Eval[B]) ⇒ Eval[B]): Eval[B]

    Permalink

    Lazily-apply the given function to the value with the given B when valid, otherwise return the given B.

  18. def forall(f: (A) ⇒ Boolean): Boolean

    Permalink

    Is this Invalid or matching the predicate

  19. def foreach(f: (A) ⇒ Unit): Unit

    Permalink

    Run the side-effecting function on the value if it is Valid

  20. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  21. def getOrElse[B >: A](default: ⇒ B): B

    Permalink

    Return the Valid value, or the default if Invalid

  22. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  23. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. def isInvalid: Boolean

    Permalink
  25. def isValid: Boolean

    Permalink
  26. def map[B](f: (A) ⇒ B): Validated[E, B]

    Permalink

    Apply a function to a Valid value, returning a new Valid value

  27. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  30. def orElse[EE, AA >: A](default: ⇒ Validated[EE, AA]): Validated[EE, AA]

    Permalink

    Return this if it is Valid, or else fall back to the given default.

  31. def partialCompare[EE >: E, AA >: A](that: Validated[EE, AA])(implicit EE: PartialOrder[EE], AA: PartialOrder[AA]): Double

    Permalink
  32. def productIterator: Iterator[Any]

    Permalink
    Definition Classes
    Product
  33. def productPrefix: String

    Permalink
    Definition Classes
    Product
  34. def show[EE >: E, AA >: A](implicit EE: Show[EE], AA: Show[AA]): String

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

    Permalink
    Definition Classes
    AnyRef
  36. def toEither: Either[E, A]

    Permalink

    Converts the value to an Either[E,A]

  37. def toList: List[A]

    Permalink

    Convert this value to a single element List if it is Valid, otherwise return an empty List

  38. def toOption: Option[A]

    Permalink

    Returns Valid values wrapped in Some, and None for Invalid values

  39. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  40. def toValidatedNel[EE >: E, AA >: A]: ValidatedNel[EE, AA]

    Permalink

    Lift the Invalid value into a NonEmptyList.

  41. def toXor: Xor[E, A]

    Permalink

    Convert this value to RightOr if Valid or LeftOr if Invalid

  42. def traverse[F[_], EE >: E, B](f: (A) ⇒ F[B])(implicit F: Applicative[F]): F[Validated[EE, B]]

    Permalink

    When Valid, apply the function, marking the result as valid inside the Applicative's context, when Invalid, lift the Error into the Applicative's contexst

  43. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. def withXor[EE, B](f: (Xor[E, A]) ⇒ Xor[EE, B]): Validated[EE, B]

    Permalink

    Convert to an Xor, apply a function, convert back.

    Convert to an Xor, apply a function, convert back. This is handy when you want to use the Monadic properties of the Xor type.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped