trait Getter[S, A] extends Fold[S, A]

A Getter can be seen as a glorified get method between a type S and a type A.

A Getter is also a valid Fold

S

the source of a Getter

A

the target of a Getter

Self Type
Getter[S, A]
Source
Getter.scala
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Getter
  2. Fold
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

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

    get the target of a Getter

Concrete Value Members

  1. def all(p: (A) => Boolean): (S) => Boolean

    check if all targets satisfy the predicate

    check if all targets satisfy the predicate

    Definition Classes
    Fold
  2. def andThen[B](other: Getter[A, B]): Getter[S, B]

    compose a Getter with a Getter

  3. def andThen[B](other: Fold[A, B]): Fold[S, B]

    compose a Fold with another Fold

    compose a Fold with another Fold

    Definition Classes
    Fold
  4. def asFold: Fold[S, A]

    view a Getter with a Fold

  5. def choice[S1](other: Getter[S1, A]): Getter[Either[S, S1], A]

    join two Getter with the same target

  6. def exist(p: (A) => Boolean): (S) => Boolean

    check if the target satisfies the predicate

    check if the target satisfies the predicate

    Definition Classes
    GetterFold
  7. def find(p: (A) => Boolean): (S) => Option[A]

    find if the target satisfies the predicate

    find if the target satisfies the predicate

    Definition Classes
    GetterFold
  8. 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

    Definition Classes
    Fold
  9. def foldMap[M](f: (A) => M)(s: S)(implicit arg0: Monoid[M]): M

    map each target to a Monoid and combine the results underlying representation of Fold, all Fold methods are defined in terms of foldMap

    map each target to a Monoid and combine the results underlying representation of Fold, all Fold methods are defined in terms of foldMap

    Definition Classes
    GetterFold
  10. def getAll(s: S): List[A]

    get all the targets of a Fold

    get all the targets of a Fold

    Definition Classes
    Fold
  11. def headOption(s: S): Option[A]

    get the first target

    get the first target

    Definition Classes
    Fold
  12. def index[I, A1](i: I)(implicit evIndex: Index[A, I, A1]): Fold[S, A1]
    Definition Classes
    GetterFold
  13. def isEmpty(s: S): Boolean

    check if there is no target

    check if there is no target

    Definition Classes
    Fold
  14. def lastOption(s: S): Option[A]

    get the last target

    get the last target

    Definition Classes
    Fold
  15. def length(s: S): Int

    calculate the number of targets

    calculate the number of targets

    Definition Classes
    Fold
  16. def nonEmpty(s: S): Boolean

    check if there is at least one target

    check if there is at least one target

    Definition Classes
    Fold
  17. def some[A1](implicit ev1: =:=[A, Option[A1]]): Fold[S, A1]
    Definition Classes
    GetterFold
  18. def split[S1, A1](other: Getter[S1, A1]): Getter[(S, S1), (A, A1)]

    pair two disjoint Getter

  19. def to[C](f: (A) => C): Getter[S, C]

    Compose with a function lifted into a Getter

    Compose with a function lifted into a Getter

    Definition Classes
    GetterFold
  20. def zip[A1](other: Getter[S, A1]): Getter[S, (A, A1)]

Deprecated Value Members

  1. def first[B]: Getter[(S, B), (A, B)]
    Annotations
    @deprecated
    Deprecated

    (Since version 3.0.0-M4) no replacement

  2. def left[C]: Getter[Either[S, C], Either[A, C]]
    Definition Classes
    GetterFold
    Annotations
    @deprecated
    Deprecated

    (Since version 3.0.0-M4) no replacement

  3. def right[C]: Getter[Either[C, S], Either[C, A]]
    Definition Classes
    GetterFold
    Annotations
    @deprecated
    Deprecated

    (Since version 3.0.0-M4) no replacement

  4. def second[B]: Getter[(B, S), (B, A)]
    Annotations
    @deprecated
    Deprecated

    (Since version 3.0.0-M4) no replacement