monocle

PTraversal

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 monomoprhic 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]
See also

TraversalLaws in monocle-law module

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. PTraversal
  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 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: 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]): PTraversal[S, T, C, D]

    alias to composeIso

    alias to composeIso

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

    alias to composePrism

    alias to composePrism

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

    alias to composeOptional

    alias to composeOptional

    Annotations
    @inline()
  11. final def all(p: (A) ⇒ Boolean)(s: S): Boolean

    check if all targets satisfy the predicate

    check if all targets satisfy the predicate

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

    view a PTraversal as a Fold

    view a PTraversal as a Fold

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

    Definition Classes
    Any
  14. final def asSetter: PSetter[S, T, A, B]

    view a PTraversal as a PSetter

    view a PTraversal as a PSetter

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  16. 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()
  17. 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()
  18. 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()
  19. 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()
  20. 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()
  21. 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()
  22. 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()
  23. 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()
  24. final def eq(arg0: AnyRef): Boolean

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

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

    check if at least one target satisfies the predicate

    check if at least one target satisfies the predicate

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

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

    find the first target of a PTraversal matching the predicate

    find the first target of a PTraversal matching the predicate

    Annotations
    @inline()
  29. 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()
  30. 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()
  31. final def getAll(s: S): List[A]

    get all the targets of a PTraversal

    get all the targets of a PTraversal

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

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

    Definition Classes
    AnyRef → Any
  34. final def headOption(s: S): Option[A]

    get the first target of a PTraversal

    get the first target of a PTraversal

    Annotations
    @inline()
  35. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  36. 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()
  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 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()
  41. final def sum[S1, T1](other: PTraversal[S1, T1, A, B]): PTraversal[\/[S, S1], \/[T, T1], A, B]

    join two PTraversal with the same target

    join two PTraversal with the same target

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

    Definition Classes
    AnyRef
  43. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. final def headMaybe(s: S): Maybe[A]

    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 1.1.0) use headOption

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped