cats.data.Validated

Valid

final case class Valid[+A](a: A) extends Validated[Nothing, A] with Product with Serializable

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Valid
  2. Validated
  3. Serializable
  4. Serializable
  5. Product
  6. Equals
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Valid(a: A)

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def ===[EE >: Nothing, AA >: A](that: Validated[EE, AA])(implicit EE: Eq[EE], AA: Eq[AA]): Boolean

    Definition Classes
    Validated
  7. val a: A

  8. def ap[EE >: Nothing, B](f: Validated[EE, (A) ⇒ B])(implicit EE: Semigroup[EE]): Validated[EE, B]

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

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

    Definition Classes
    Validated
  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def bimap[EE, AA](fe: (Nothing) ⇒ EE, fa: (A) ⇒ AA): Validated[EE, AA]

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

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

    Definition Classes
    Validated
  11. def clone(): AnyRef

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

    Definition Classes
    Validated
  13. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  14. def exists(predicate: (A) ⇒ Boolean): Boolean

    Is this Valid and matching the given predicate

    Is this Valid and matching the given predicate

    Definition Classes
    Validated
  15. def filter[EE >: Nothing](pred: (A) ⇒ Boolean)(implicit M: Monoid[EE]): Validated[EE, A]

    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.

    Definition Classes
    Validated
  16. def finalize(): Unit

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

    Definition Classes
    Validated
  18. def foldLeft[B](b: B)(f: (B, A) ⇒ B): B

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

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

    Definition Classes
    Validated
  19. def foldRight[B](lb: Eval[B])(f: (A, Eval[B]) ⇒ Eval[B]): Eval[B]

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

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

    Definition Classes
    Validated
  20. def forall(f: (A) ⇒ Boolean): Boolean

    Is this Invalid or matching the predicate

    Is this Invalid or matching the predicate

    Definition Classes
    Validated
  21. def foreach(f: (A) ⇒ Unit): Unit

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

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

    Definition Classes
    Validated
  22. final def getClass(): Class[_]

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

    Return the Valid value, or the default if Invalid

    Return the Valid value, or the default if Invalid

    Definition Classes
    Validated
  24. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  25. def isInvalid: Boolean

    Definition Classes
    Validated
  26. def isValid: Boolean

    Definition Classes
    Validated
  27. def map[B](f: (A) ⇒ B): Validated[Nothing, B]

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

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

    Definition Classes
    Validated
  28. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  29. final def notify(): Unit

    Definition Classes
    AnyRef
  30. final def notifyAll(): Unit

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

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

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

    Definition Classes
    Validated
  32. def partialCompare[EE >: Nothing, AA >: A](that: Validated[EE, AA])(implicit EE: PartialOrder[EE], AA: PartialOrder[AA]): Double

    Definition Classes
    Validated
  33. def show[EE >: Nothing, AA >: A](implicit EE: Show[EE], AA: Show[AA]): String

    Definition Classes
    Validated
  34. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  35. def toEither: Either[Nothing, A]

    Converts the value to an Either[E,A]

    Converts the value to an Either[E,A]

    Definition Classes
    Validated
  36. def toList: List[A]

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

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

    Definition Classes
    Validated
  37. def toOption: Option[A]

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

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

    Definition Classes
    Validated
  38. def toValidatedNel[EE >: Nothing, AA >: A]: ValidatedNel[EE, AA]

    Lift the Invalid value into a NonEmptyList.

    Lift the Invalid value into a NonEmptyList.

    Definition Classes
    Validated
  39. def toXor: Xor[Nothing, A]

    Convert this value to RightOr if Valid or LeftOr if Invalid

    Convert this value to RightOr if Valid or LeftOr if Invalid

    Definition Classes
    Validated
  40. def traverse[F[_], EE >: Nothing, B](f: (A) ⇒ F[B])(implicit F: Applicative[F]): F[Validated[EE, B]]

    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

    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

    Definition Classes
    Validated
  41. final def wait(): Unit

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

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

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

    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.

    Definition Classes
    Validated

Inherited from Validated[Nothing, A]

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped