scalaz

PLensFamily

sealed trait PLensFamily[-A1, +A2, +B1, -B2] extends AnyRef

Partial Lens Families, offering a purely functional means to access and retrieve an optional field transitioning from type B1 to type B2 in a record that is simultaneously transitioning from type A1 to type A2. scalaz.PLens is a convenient alias for when F =:= Id, A1 =:= A2, and B1 =:= B2.

The term field should not be interpreted restrictively to mean a member of a class. For example, a partial lens family can address the nth element of a List.

A1

The initial type of the record

A2

The final type of the record

B1

The initial type of the optional field

B2

The final type of the optional field

Source
PLens.scala
See also

scalaz.Lens

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

Abstract Value Members

  1. abstract def run(a: A1): Option[IndexedStore[B1, B2, A2]]

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. def %%=[A >: A2 <: A1, C](s: IndexedState[B1, B2, C]): PState[A, C]

  5. def %=[A >: A2 <: A1, B <: B2](f: (B1) ⇒ B): PState[A, B]

  6. def %==[A >: A2 <: A1, B <: B2](f: (B1) ⇒ B): State[A, Unit]

  7. def ***[C1, C2, D1, D2](that: PLensFamily[C1, C2, D1, D2]): PLensFamily[(A1, C1), (A2, C2), (B1, D1), (B2, D2)]

    alias for product

  8. def ->>-[A >: A2 <: A1, C](f: ⇒ State[A, C]): PState[A, C]

  9. def :=[A >: A2 <: A1, B <: B2](b: ⇒ B): PState[A, B]

  10. def <=<[C1, C2](that: PLensFamily[C1, C2, A1, A2]): PLensFamily[C1, C2, B1, B2]

    alias for compose

  11. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  13. def =>=[A >: A2 <: A1](f: (B1) ⇒ B2): (A) ⇒ A

  14. def =?>=(f: (B1) ⇒ B2): (A1) ⇒ Option[A2]

  15. def >-[A >: A2 <: A1, C](f: (B1) ⇒ C): PState[A, C]

  16. def >=>[C1, C2](that: PLensFamily[B1, B2, C1, C2]): PLensFamily[A1, A2, C1, C2]

    alias for andThen

  17. def >>-[A >: A2 <: A1, C](f: (B1) ⇒ State[A, C]): PState[A, C]

  18. def andThen[C1, C2](that: PLensFamily[B1, B2, C1, C2]): PLensFamily[A1, A2, C1, C2]

  19. def apply(a: A1): Option[IndexedStore[B1, B2, A2]]

  20. def as[A <: A1](f: (B1) ⇒ A, a: A): A

    If the Partial Lens is null, then return the target object, otherwise run the function on its projection.

  21. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  22. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. def compose[C1, C2](that: PLensFamily[C1, C2, A1, A2]): PLensFamily[C1, C2, B1, B2]

    Partial Lenses can be composed

  24. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  26. def exists(p: (B1) ⇒ Boolean, a: A1): Boolean

  27. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  28. def forall(p: (B1) ⇒ Boolean, a: A1): Boolean

  29. def get(a: A1): Option[B1]

  30. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  31. def getK: Kleisli[Option, A1, B1]

  32. def getOr[B >: B1](a: A1, b: ⇒ B): B

    If the Partial Lens is null, then return the given default value.

  33. def getOrZ[B >: B1](a: A1)(implicit M: Monoid[B]): B

  34. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  35. def is(a: A1): Boolean

  36. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  37. def isNot(a: A1): Boolean

  38. def kleisli: Kleisli[Option, A1, IndexedStore[B1, B2, A2]]

  39. def mod[A >: A2 <: A1](f: (B1) ⇒ B2, a: A): A

    Modify the potential value viewed through the partial lens

  40. def modg(f: (B1) ⇒ B2, a: A1): Option[A2]

  41. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  44. def product[C1, C2, D1, D2](that: PLensFamily[C1, C2, D1, D2]): PLensFamily[(A1, C1), (A2, C2), (B1, D1), (B2, D2)]

    Two disjoint partial lenses can be paired

  45. def set(a: A1, b: B2): Option[A2]

  46. def setK(a: A1): Kleisli[Option, B2, A2]

  47. def setOr[A >: A2](a: A1, b: B2, d: ⇒ A): A

  48. def setOrZ[A >: A2](a: A1, b: B2)(implicit M: Monoid[A]): A

  49. def st[A <: A1]: PState[A, B1]

  50. def sum[C1, C2, B1m >: B1, B2m <: B2](that: ⇒ PLensFamily[C1, C2, B1m, B2m]): PLensFamily[\/[A1, C1], \/[A2, C2], B1m, B2m]

    Two partial lenses that view a value of the same type can be joined

  51. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  52. def toString(): String

    Definition Classes
    AnyRef → Any
  53. def trySet(a: A1): Option[(B2) ⇒ A2]

  54. def trySetK: Kleisli[Option, A1, (B2) ⇒ A2]

  55. def trySetOr[A >: A2, B <: B2](a: A1, d: ⇒ (B) ⇒ A): (B) ⇒ A

  56. def trySetOrZ[A >: A2, B <: B2](a: A1)(implicit M: Monoid[(B) ⇒ A]): (B) ⇒ A

  57. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  60. def xmapA[X1, X2](f: (A2) ⇒ X2)(g: (X1) ⇒ A1): PLensFamily[X1, X2, B1, B2]

  61. def xmapB[X1, X2](f: (B1) ⇒ X1)(g: (X2) ⇒ B2): PLensFamily[A1, A2, X1, X2]

  62. def xmapbA[X, A >: A2 <: A1](b: BijectionT.Bijection[A, X]): PLensFamily[X, X, B1, B2]

  63. def xmapbB[X, B >: B1 <: B2](b: BijectionT.Bijection[B, X]): PLensFamily[A1, A2, X, X]

  64. def |||[C1, C2, B1m >: B1, B2m <: B2](that: ⇒ PLensFamily[C1, C2, B1m, B2m]): PLensFamily[\/[A1, C1], \/[A2, C2], B1m, B2m]

    Alias for sum

Inherited from AnyRef

Inherited from Any

Ungrouped