monocle

PIso

abstract class PIso[S, T, A, B] extends Serializable

A PIso defines an isomorphism between types S, A and B, T:

             get                           reverse.get
    -------------------->             -------------------->
  S                       A         T                       B
    <--------------------             <--------------------
      reverse.reverseGet                   reverseGet

In addition, if f and g forms an isomorphism between A and B, i.e. if f . g = id and g . f = id, then a PIso defines an isomorphism between S and T:

    S           T                                   S           T
    |           ↑                                   ↑           |
    |           |                                   |           |
get |           | reverseGet     reverse.reverseGet |           | reverse.get
    |           |                                   |           |
    ↓     f     |                                   |     g     ↓
    A --------> B                                   A <-------- B

Iso is a type alias for PIso where S = A and T = B:

type Iso[S, A] = PIso[S, S, A, A]

A PIso is also a valid Getter, Fold, PLens, PPrism, POptional, PTraversal and PSetter

S

the source of a PIso

T

the modified source of a PIso

A

the target of a PIso

B

the modified target of a PIso

Self Type
PIso[S, T, A, B]
See also

IsoLaws in monocle-law module

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. PIso
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new PIso()

Abstract Value Members

  1. abstract def get(s: S): A

    get the target of a PIso

  2. abstract def reverse: PIso[B, A, T, S]

    reverse a PIso: the source becomes the target and the target becomes the source

  3. abstract def reverseGet(b: B): T

    get the modified source of a PIso

Concrete 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. final def ^<->[C, D](other: PIso[A, B, C, D]): PIso[S, T, C, D]

    alias to composeIso

    alias to composeIso

    Annotations
    @inline()
  7. final def ^<-?[C, D](other: PPrism[A, B, C, D]): PPrism[S, T, C, D]

    alias to composePrism

    alias to composePrism

    Annotations
    @inline()
  8. final def ^|->[C, D](other: PLens[A, B, C, D]): PLens[S, T, C, D]

    alias to composeLens

    alias to composeLens

    Annotations
    @inline()
  9. final def ^|->>[C, D](other: PTraversal[A, B, C, D]): PTraversal[S, T, C, D]

    alias to composeTraversal

    alias to composeTraversal

    Annotations
    @inline()
  10. final def ^|-?[C, D](other: POptional[A, B, C, D]): POptional[S, T, C, D]

    alias to composeOptional

    alias to composeOptional

    Annotations
    @inline()
  11. final def asFold: Fold[S, A]

    view a PIso as a Fold

    view a PIso as a Fold

    Annotations
    @inline()
  12. final def asGetter: Getter[S, A]

    view a PIso as a Getter

    view a PIso as a Getter

    Annotations
    @inline()
  13. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  14. final def asLens: PLens[S, T, A, B]

    view a PIso as a PLens

    view a PIso as a PLens

    Annotations
    @inline()
  15. final def asOptional: POptional[S, T, A, B]

    view a PIso as a POptional

    view a PIso as a POptional

    Annotations
    @inline()
  16. final def asPrism: PPrism[S, T, A, B]

    view a PIso as a PPrism

    view a PIso as a PPrism

    Annotations
    @inline()
  17. final def asSetter: PSetter[S, T, A, B]

    view a PIso as a Setter

    view a PIso as a Setter

    Annotations
    @inline()
  18. final def asTraversal: PTraversal[S, T, A, B]

    view a PIso as a PTraversal

    view a PIso as a PTraversal

    Annotations
    @inline()
  19. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def composeFold[C](other: Fold[A, C]): Fold[S, C]

    compose a PIso with a Fold

    compose a PIso with a Fold

    Annotations
    @inline()
  21. final def composeGetter[C](other: Getter[A, C]): Getter[S, C]

    compose a PIso with a Getter

    compose a PIso with a Getter

    Annotations
    @inline()
  22. final def composeIso[C, D](other: PIso[A, B, C, D]): PIso[S, T, C, D]

    compose a PIso with a PIso

    compose a PIso with a PIso

    Annotations
    @inline()
  23. final def composeLens[C, D](other: PLens[A, B, C, D]): PLens[S, T, C, D]

    compose a PIso with a PLens

    compose a PIso with a PLens

    Annotations
    @inline()
  24. final def composeOptional[C, D](other: POptional[A, B, C, D]): POptional[S, T, C, D]

    compose a PIso with a POptional

    compose a PIso with a POptional

    Annotations
    @inline()
  25. final def composePrism[C, D](other: PPrism[A, B, C, D]): PPrism[S, T, C, D]

    compose a PIso with a PPrism

    compose a PIso with a PPrism

    Annotations
    @inline()
  26. final def composeSetter[C, D](other: PSetter[A, B, C, D]): PSetter[S, T, C, D]

    compose a PIso with a PSetter

    compose a PIso with a PSetter

    Annotations
    @inline()
  27. final def composeTraversal[C, D](other: PTraversal[A, B, C, D]): PTraversal[S, T, C, D]

    compose a PIso with a PTraversal

    compose a PIso with a PTraversal

    Annotations
    @inline()
  28. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  30. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  31. final def first[C]: PIso[(S, C), (T, C), (A, C), (B, C)]

    Annotations
    @inline()
  32. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  33. def hashCode(): Int

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

    Definition Classes
    Any
  35. final def modify(f: (A) ⇒ B): (S) ⇒ T

    modify polymorphically the target of a PIso with a function

    modify polymorphically the target of a PIso with a function

    Annotations
    @inline()
  36. final def modifyF[F[_]](f: (A) ⇒ F[B])(s: S)(implicit arg0: Functor[F]): F[T]

    modify polymorphically the target of a PIso with a Functor function

    modify polymorphically the target of a PIso with a Functor function

    Annotations
    @inline()
  37. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  40. final def product[S1, T1, A1, B1](other: PIso[S1, T1, A1, B1]): PIso[(S, S1), (T, T1), (A, A1), (B, B1)]

    pair two disjoint PIso

    pair two disjoint PIso

    Annotations
    @inline()
  41. final def second[C]: PIso[(C, S), (C, T), (C, A), (C, B)]

    Annotations
    @inline()
  42. final def set(b: B): (S) ⇒ T

    set polymorphically the target of a PIso with a value

    set polymorphically the target of a PIso with a value

    Annotations
    @inline()
  43. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  44. def toString(): String

    Definition Classes
    AnyRef → Any
  45. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped