Packages

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

A PTraversal can be seen as a POptional generalised to 0 to n targets where n can be infinite.

PTraversal stands for Polymorphic Traversal as it set and modify methods change a type A to B and S to T. Traversal is a type alias for PTraversal restricted to monomorphic updates:

type Traversal[S, A] = PTraversal[S, S, A, A]
S

the source of a PTraversal

T

the modified source of a PTraversal

A

the target of a PTraversal

B

the modified target of a PTraversal

Self Type
PTraversal[S, T, A, B]
Source
Traversal.scala
See also

monocle.law.TraversalLaws

Linear Supertypes
Serializable, AnyRef, Any
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PTraversal
  2. Serializable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new PTraversal()

Abstract Value Members

  1. abstract def modifyF[F[_]](f: (A) => F[B])(s: S)(implicit arg0: Applicative[F]): F[T]

    modify polymorphically the target of a PTraversal with an Applicative function all traversal methods are written in terms of modifyF

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

    alias to composeIso

    alias to composeIso

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

    alias to composePrism

    alias to composePrism

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

    alias to composeLens

    alias to composeLens

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

    alias to composeTraversal

    alias to composeTraversal

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

    alias to composeOptional

    alias to composeOptional

    Annotations
    @inline()
  9. final def all(p: (A) => Boolean): (S) => Boolean

    check if all targets satisfy the predicate

    check if all targets satisfy the predicate

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

    view a PTraversal as a Fold

    view a PTraversal as a Fold

    Annotations
    @inline()
  11. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  12. final def asSetter: PSetter[S, T, A, B]

    view a PTraversal as a PSetter

    view a PTraversal as a PSetter

    Annotations
    @inline()
  13. final def choice[S1, T1](other: PTraversal[S1, T1, A, B]): PTraversal[Either[S, S1], Either[T, T1], A, B]

    join two PTraversal with the same target

    join two PTraversal with the same target

    Annotations
    @inline()
  14. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  15. final def composeFold[C](other: Fold[A, C]): Fold[S, C]

    compose a PTraversal with a Fold

    compose a PTraversal with a Fold

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

    compose a PTraversal with a Getter

    compose a PTraversal with a Getter

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

    compose a PTraversal with a PIso

    compose a PTraversal with a PIso

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

    compose a PTraversal with a PLens

    compose a PTraversal with a PLens

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

    compose a PTraversal with a POptional

    compose a PTraversal with a POptional

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

    compose a PTraversal with a PPrism

    compose a PTraversal with a PPrism

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

    compose a PTraversal with a PSetter

    compose a PTraversal with a PSetter

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

    compose a PTraversal with a PTraversal

    compose a PTraversal with a PTraversal

    Annotations
    @inline()
  23. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  25. final def exist(p: (A) => Boolean): (S) => Boolean

    check if at least one target satisfies the predicate

    check if at least one target satisfies the predicate

    Annotations
    @inline()
  26. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  27. final def find(p: (A) => Boolean): (S) => Option[A]

    find the first target matching the predicate

    find the first target matching the predicate

    Annotations
    @inline()
  28. final def fold(s: S)(implicit ev: Monoid[A]): A

    combine all targets using a target's Monoid

    combine all targets using a target's Monoid

    Annotations
    @inline()
  29. final def foldMap[M](f: (A) => M)(s: S)(implicit arg0: Monoid[M]): M

    map each target to a Monoid and combine the results

    map each target to a Monoid and combine the results

    Annotations
    @inline()
  30. final def getAll(s: S): List[A]

    get all the targets of a PTraversal

    get all the targets of a PTraversal

    Annotations
    @inline()
  31. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  32. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  33. final def headOption(s: S): Option[A]

    get the first target

    get the first target

    Annotations
    @inline()
  34. final def isEmpty(s: S): Boolean

    check if there is no target

    check if there is no target

    Annotations
    @inline()
  35. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  36. final def lastOption(s: S): Option[A]

    get the last target

    get the last target

    Annotations
    @inline()
  37. final def length(s: S): Int

    calculate the number of targets

    calculate the number of targets

    Annotations
    @inline()
  38. final def modify(f: (A) => B): (S) => T

    modify polymorphically the target of a PTraversal with a function

    modify polymorphically the target of a PTraversal with a function

    Annotations
    @inline()
  39. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  40. final def nonEmpty(s: S): Boolean

    check if there is at least one target

    check if there is at least one target

    Annotations
    @inline()
  41. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  42. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  43. final def parModifyF[F[_]](f: (A) => F[B])(s: S)(implicit F: Parallel[F]): F[T]

    PTraversal.modifyF for a Parallel applicative functor.

    PTraversal.modifyF for a Parallel applicative functor.

    Annotations
    @inline()
  44. final def set(b: B): (S) => T

    set polymorphically the target of a PTraversal with a value

    set polymorphically the target of a PTraversal with a value

    Annotations
    @inline()
  45. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  46. def toString(): String
    Definition Classes
    AnyRef → Any
  47. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  48. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  49. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped