Packages

object Validated

Source
Validated.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Validated
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def fromEither[A](either: Either[Seq[String], A]): Validated[A]

    Turns an Either[Seq[String], A] into a Validated[A]

  9. def fromOption[A](maybeA: Option[A])(error: => String): Validated[A]

    Turns None into an invalid value, using the given error message.

    Turns None into an invalid value, using the given error message. Turns a Some[A] value into a Valid[A] value.

  10. def fromTry[A](tryA: Try[A]): Validated[A]

    Turns a Success[A] into a Valid[A]

    Turns a Success[A] into a Valid[A]

    Turns a Failure[A] into an invalid value, using the exception message as an 'error' message

  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  17. def sequence[A, CC[X] <: IterableOnce[X]](in: CC[Validated[A]])(implicit bf: BuildFrom[CC[Validated[A]], A, CC[A]]): Validated[CC[A]]

    Turns a collection of valid values into a valid collection of values.

    Turns a collection of valid values into a valid collection of values. If all the values in the collection are Valid, the result will be Valid. If there is at least one Invalid, the result will be an Invalid containing the error messages of all Invalids If the collection is empty, it will return a Valid empty collection.

    A

    the type of the Validated values (e.g. Int)

    CC

    the type of the collection of Validated values (e.g. List)

    in

    the collection of Validated values that will be sequenced

    returns

    the Validated of the resulting collection

    See also

    scala.concurrent.Future.sequence

  18. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  19. def toString(): String
    Definition Classes
    AnyRef → Any
  20. def traverse[A, B, CC[X] <: IterableOnce[X]](in: CC[A])(fn: (A) => Validated[B])(implicit bf: BuildFrom[CC[A], B, CC[B]]): Validated[CC[B]]

    Validates a collection of values using the provided function A => Validated[B] to validate every value.

    Validates a collection of values using the provided function A => Validated[B] to validate every value. If all the values in the collection are Valid, the result will be Valid. If there is at least one Invalid, the result will be an Invalid containing the error messages of all Invalids If the collection is empty, it will return a Valid empty collection.

    val myValidatedList = Validated.traverse(myList)(x => myValidateFunc(x))
    A

    the type of the values to be validated (e.g. String)

    B

    the type of the returned validated values (e.g. Int)

    CC

    the type of the collection of Validated (e.g. List)

    in

    the collection of values to be validated with the provided function

    fn

    the validation function

    returns

    the Validated of the resulting collection

    See also

    scala.concurrent.Future.traverse

  21. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  22. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped