abstract class LensImpl[M[_]] extends Lens[M]
This implements most of the methods of Lens. Implementors of a new type of lens
must implement retr for the read side of the lens and updated for the update side of the lens.
- Self Type
- LensImpl[M]
- Alphabetic
- By Inheritance
- LensImpl
- Lens
- ReadLens
- UpdateLens
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
- abstract def retr: (JsValue) => Validated[M[JsValue]]
Given a parent JsValue, tries to extract the child value.
Given a parent JsValue, tries to extract the child value.
- returns
Right(value)if the lens read succeeds.Left(error)if the lens read fails.
- Definition Classes
- ReadLens
- abstract def updated(f: Operation)(parent: JsValue): SafeJsValue
Applies function
fon the child of theparentdenoted by this UpdateLens and returns aRightof the parent with the child element updated.Applies function
fon the child of theparentdenoted by this UpdateLens and returns aRightof the parent with the child element updated.The value passed to
fmay beLeft(e)if the child could not be found in which case particular operations may still succeed. Functionfmay returnLeft(error)in case the operation fails.updatedreturnsLeft(error)if the update operation or any of any intermediate lens fails.- Definition Classes
- UpdateLens
Concrete Value Members
- def !(op: Operation): Update
- Definition Classes
- LensImpl → UpdateLens
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- def /[M2[_], R[_]](next: Lens[M2])(implicit ev: Join[M2, M, R]): Lens[R]
A shortcut for the
combinelens which combines two lenses. - final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def get[T](p: JsValue)(implicit arg0: Reader[T]): M[T]
Given a parent JsValue extracts and converts a JsValue into a value of type
Tor throws an exception. - final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def is[U](f: (U) => Boolean)(implicit arg0: Reader[U]): JsPred
Lifts a predicate for a converted value for this lens up to the parent level.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- implicit val ops: Ops[M]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toSeq: Lens[Seq]
- def toString(): String
- Definition Classes
- AnyRef → Any
- def tryGet[T](p: JsValue)(implicit arg0: Reader[T]): Validated[M[T]]
Given a parent JsValue extracts and tries to convert the JsValue into a value of type
T - final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()