Class/Object

monocle

PIso

Related Docs: object PIso | package monocle

Permalink

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

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

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

An Iso defines an isomorphism between a type S and A:

            get
    -------------------->
  S                       A
    <--------------------
         reverseGet

A PIso allows to lift a function f: A => B to S => T and a function g: T => S to B => A

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

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

monocle.law.IsoLaws

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
Visibility
  1. Public
  2. All

Instance Constructors

  1. new PIso()

    Permalink

Abstract Value Members

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

    Permalink

    get the target of a PIso

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

    Permalink

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

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

    Permalink

    get the modified source of a PIso

Concrete Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def ^<->[C, D](other: PIso[A, B, C, D]): PIso[S, T, C, D]

    Permalink

    alias to composeIso

    alias to composeIso

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

    Permalink

    alias to composePrism

    alias to composePrism

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

    Permalink

    alias to composeLens

    alias to composeLens

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

    Permalink

    alias to composeTraversal

    alias to composeTraversal

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

    Permalink

    alias to composeOptional

    alias to composeOptional

    Annotations
    @inline()
  9. def apply[C, D, E, F, G, H](c: C, d: D, e: E, f: F, g: G, h: H)(implicit ev: <~<[(C, D, E, F, G, H), B]): T

    Permalink
  10. def apply[C, D, E, F, G](c: C, d: D, e: E, f: F, g: G)(implicit ev: <~<[(C, D, E, F, G), B]): T

    Permalink
  11. def apply[C, D, E, F](c: C, d: D, e: E, f: F)(implicit ev: <~<[(C, D, E, F), B]): T

    Permalink
  12. def apply[C, D, E](c: C, d: D, e: E)(implicit ev: <~<[(C, D, E), B]): T

    Permalink
  13. def apply[C, D](c: C, d: D)(implicit ev: <~<[(C, D), B]): T

    Permalink
  14. def apply(b: B): T

    Permalink
  15. def apply()(implicit ev: ===[B, Unit]): T

    Permalink

    **********************************************************************

  16. final def asFold: Fold[S, A]

    Permalink

    view a PIso as a Fold

    view a PIso as a Fold

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

    Permalink

    view a PIso as a Getter

    view a PIso as a Getter

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

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

    Permalink

    view a PIso as a PLens

    view a PIso as a PLens

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

    Permalink

    view a PIso as a POptional

    view a PIso as a POptional

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

    Permalink

    view a PIso as a PPrism

    view a PIso as a PPrism

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

    Permalink

    view a PIso as a Setter

    view a PIso as a Setter

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

    Permalink

    view a PIso as a PTraversal

    view a PIso as a PTraversal

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

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

    Permalink

    compose a PIso with a Fold

    compose a PIso with a Fold

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

    Permalink

    compose a PIso with a Getter

    compose a PIso with a Getter

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

    Permalink

    compose a PIso with a PIso

    compose a PIso with a PIso

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

    Permalink

    compose a PIso with a PLens

    compose a PIso with a PLens

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

    Permalink

    compose a PIso with a POptional

    compose a PIso with a POptional

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

    Permalink

    compose a PIso with a PPrism

    compose a PIso with a PPrism

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

    Permalink

    compose a PIso with a PSetter

    compose a PIso with a PSetter

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

    Permalink

    compose a PIso with a PTraversal

    compose a PIso with a PTraversal

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  35. final def exist(p: (A) ⇒ Boolean): (S) ⇒ Boolean

    Permalink

    check if the target satisfies the predicate

    check if the target satisfies the predicate

    Annotations
    @inline()
  36. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  37. final def find(p: (A) ⇒ Boolean): (S) ⇒ Option[A]

    Permalink

    find if the target satisfies the predicate

    find if the target satisfies the predicate

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

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

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

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

    Permalink
    Definition Classes
    Any
  42. final def left[C]: PIso[\/[S, C], \/[T, C], \/[A, C], \/[B, C]]

    Permalink
    Annotations
    @inline()
  43. def mapping[F[_]](implicit arg0: Functor[F]): PIso[F[S], F[T], F[A], F[B]]

    Permalink

    lift a PIso to a Functor level

  44. final def modify(f: (A) ⇒ B): (S) ⇒ T

    Permalink

    modify polymorphically the target of a PIso with a function

    modify polymorphically the target of a PIso with a function

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

    Permalink

    modify polymorphically the target of a PIso with a Functor function

    modify polymorphically the target of a PIso with a Functor function

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

    Permalink
    Definition Classes
    AnyRef
  47. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  48. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  49. final def right[C]: PIso[\/[C, S], \/[C, T], \/[C, A], \/[C, B]]

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

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

    Permalink

    set polymorphically the target of a PIso with a value

    set polymorphically the target of a PIso with a value

    Annotations
    @inline()
  52. final def split[S1, T1, A1, B1](other: PIso[S1, T1, A1, B1]): PIso[(S, S1), (T, T1), (A, A1), (B, B1)]

    Permalink

    pair two disjoint PIso

    pair two disjoint PIso

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

    Permalink
    Definition Classes
    AnyRef
  54. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  55. def unapply(obj: S): Some[A]

    Permalink
  56. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped