Trait/Object

scalapb.lenses

Lens

Related Docs: object Lens | package lenses

Permalink

trait Lens[Container, A] extends Any

Self Type
Lens[Container, A]
Linear Supertypes
Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Lens
  2. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def get(c: Container): A

    Permalink

    get knows how to extract some field of type A from a container

  2. abstract def getClass(): Class[_]

    Permalink
    Definition Classes
    Any
  3. abstract def set(a: A): Mutation[Container]

    Permalink

    Represents an assignment operator.

    Represents an assignment operator.

    Given a value of type A, sets knows how to transform a container such that a is assigned to the field.

    We must have get(set(a)(c)) == a

Concrete Value Members

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

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

    Permalink
    Definition Classes
    Any
  3. def :=(a: A): Mutation[Container]

    Permalink

    alias to set

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

    Permalink
    Definition Classes
    Any
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def compose[B](other: Lens[A, B]): Lens[Container, B]

    Permalink

    Composes two lenses, this enables nesting.

    Composes two lenses, this enables nesting.

    If our field of type A has a sub-field of type B, then given a lens for it (other: Lens[A, B]) we can create a single lens from Container to B.

  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  8. def hashCode(): Int

    Permalink
    Definition Classes
    Any
  9. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  10. def modify(f: (A) ⇒ A): Mutation[Container]

    Permalink

    Represent an update operator (like x.y += 1 )

  11. def toString(): String

    Permalink
    Definition Classes
    Any
  12. def zip[B](other: Lens[Container, B]): Lens[Container, (A, B)]

    Permalink

    Given two lenses with the same origin, returns a new lens that can mutate both values represented by both lenses through a tuple.

Inherited from Any

Ungrouped