Packages

trait Surjection[A, B] extends Function[A, Either[String, B]]

A surjection of a partial function A => Either[String, B] and a total function B => A.

A surjection MUST abide by the round-tripping property, namely, for all input A that passes the validation function

surjection(input).map(surjection.from) == Right(input)

Self Type
Surjection[A, B]
Linear Supertypes
(A) => Either[String, B], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Surjection
  2. Function1
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def from(b: B): A
  2. abstract def to(a: A): Either[String, B]

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 andThen[A](g: (Either[String, B]) => A): (A) => A
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  5. final def apply(a: A): Either[String, B]
    Definition Classes
    Surjection → Function1
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  8. def compose[A](g: (A) => A): (A) => Either[String, B]
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. final def imapFull[A0, B0](sourceBijection: Bijection[A, A0], targetBijection: Bijection[B, B0]): Surjection[A0, B0]
  15. final def imapSource[A0](bijection: Bijection[A, A0]): Surjection[A0, B]
  16. final def imapTarget[B0](bijection: Bijection[B, B0]): Surjection[A, B0]
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    Function1 → AnyRef → Any
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from (A) => Either[String, B]

Inherited from AnyRef

Inherited from Any

Ungrouped