Class/Object

scalaz

PLensFamily

Related Docs: object PLensFamily | package scalaz

Permalink

sealed abstract class 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 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
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PLensFamily
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

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

    Permalink

Concrete Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. def %%=[A >: A2 <: A1, C](s: IndexedState[B1, B2, C]): PState[A, C]

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

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

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

    Permalink

    alias for product

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

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

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

    Permalink

    alias for compose

  10. final def ==(arg0: Any): Boolean

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

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

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

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

    Permalink

    alias for andThen

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

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

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

    Permalink
  18. def as(f: (B1) ⇒ A1, a: A1): A1

    Permalink

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

  19. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  20. def clone(): AnyRef

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

    Permalink

    Partial Lenses can be composed

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

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

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

    Permalink
  25. def finalize(): Unit

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

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

    Permalink
  28. final def getClass(): Class[_]

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

    Permalink
  30. def getOr(a: A1, b: ⇒ B1): B1

    Permalink

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

  31. def getOrZ(a: A1)(implicit M: Monoid[B1]): B1

    Permalink
  32. def hashCode(): Int

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

    Permalink
  34. final def isInstanceOf[T0]: Boolean

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

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

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

    Permalink

    Modify the potential value viewed through the partial lens

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

    Permalink
  39. final def ne(arg0: AnyRef): Boolean

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

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

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

    Permalink

    Two disjoint partial lenses can be paired

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

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

    Permalink
  45. def setOr(a: A1, b: B2, d: ⇒ A2): A2

    Permalink
  46. def setOrZ(a: A1, b: B2)(implicit M: Monoid[A2]): A2

    Permalink
  47. def st: PState[A1, B1]

    Permalink
  48. def sum[C1, C2](that: ⇒ PLensFamily[C1, C2, B1, B2]): PLensFamily[\/[A1, C1], \/[A2, C2], B1, B2]

    Permalink

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

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

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

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

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

    Permalink
  53. def trySetOr(a: A1, d: ⇒ (B2) ⇒ A2): (B2) ⇒ A2

    Permalink
  54. def trySetOrZ(a: A1)(implicit M: Monoid[A2]): (B2) ⇒ A2

    Permalink
  55. final def wait(): Unit

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

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

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

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

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

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

    Permalink
  62. def |||[C1, C2](that: ⇒ PLensFamily[C1, C2, B1, B2]): PLensFamily[\/[A1, C1], \/[A2, C2], B1, B2]

    Permalink

    Alias for sum

Inherited from AnyRef

Inherited from Any

Ungrouped