Packages

abstract class ValidFormat[E, T, A] extends Serializable

A validating and normalizing optic. Behaves similarly to Format, but the getter returns a Validated[E, A] instead of an Option[A].

Laws are the same for Format, except that coverage allows no normalization to happen as long as there are invalid inputs.

Composition with Format or stronger optics (Prism and Iso) yields another ValidFormat, and require providing an E instance for the invalid cases.

Self Type
ValidFormat[E, T, A]
Linear Supertypes
Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ValidFormat
  2. Serializable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new ValidFormat()

Abstract Value Members

  1. abstract val getValidated: (T) => Validated[E, A]
  2. abstract val reverseGet: (A) => T

Concrete 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. def ^<-*[B](f: Format[A, B], error: E): ValidFormat[E, T, B]
  5. def ^<->[B](f: Iso[A, B]): ValidFormat[E, T, B]
  6. def ^<-?[B](f: Prism[A, B], error: E): ValidFormat[E, T, B]
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  9. def composeFormat[B](f: Format[A, B], error: E): ValidFormat[E, T, B]

    Compose with a Format.

  10. def composeIso[B](f: Iso[A, B]): ValidFormat[E, T, B]

    Compose with an Iso.

  11. def composePrism[B](f: Prism[A, B], error: E): ValidFormat[E, T, B]

    Compose with a Prism.

  12. def composeSplitEpi[B](f: SplitEpi[A, B], error: E): ValidFormat[E, T, B]

    Compose with a SplitEpi.

  13. def composeValidFormat[B](f: ValidFormat[E, A, B]): ValidFormat[E, T, B]

    Compose with another Validate.

  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  16. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. def imapA[B](f: (B) => A, g: (A) => B): ValidFormat[E, T, B]
  19. def imapT[S](f: (T) => S, g: (S) => T): ValidFormat[E, S, A]
  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. def normalize(t: T): Validated[E, T]

    getValidated and reverseGet, yielding a normalized formatted value if valid.

    getValidated and reverseGet, yielding a normalized formatted value if valid. Subsequent getValidated/reverseGet cycles are idempotent.

  23. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  25. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  26. def toString(): String
    Definition Classes
    AnyRef → Any
  27. def unsafeGet(t: T): A

    Like getValidated, but throws IllegalArgumentException when Invalid.

  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  30. 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

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped