case class Optic[-GetWhole, -SetWholeBefore, -SetPiece, +GetError, +SetError, +GetPiece, +SetWholeAfter](getOptic: (GetWhole) => (OpticModule.this)#OpticResult[(GetError, SetWholeAfter), GetPiece], setOptic: (SetPiece) => (SetWholeBefore) => (OpticModule.this)#OpticResult[(SetError, SetWholeAfter), SetWholeAfter]) extends Product with Serializable
An Optic
is able to get and set a piece of a whole, possibly failing. In
the most general possible case the get and set types are distinct and
getting may fail with a different error than setting.
- Self Type
- (OpticModule.this)#Optic[GetWhole, SetWholeBefore, SetPiece, GetError, SetError, GetPiece, SetWholeAfter]
- Alphabetic
- By Inheritance
- Optic
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Optic(getOptic: (GetWhole) => (OpticModule.this)#OpticResult[(GetError, SetWholeAfter), GetPiece], setOptic: (SetPiece) => (SetWholeBefore) => (OpticModule.this)#OpticResult[(SetError, SetWholeAfter), SetWholeAfter])
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def <*>[GetWhole1 <: GetWhole, SetWholeBefore1 >: SetWholeAfter <: SetWholeBefore, SetPiece2, GetError1 >: GetError, SetError1 >: SetError, GetPiece2, SetWholeAfter1 >: SetWholeAfter](that: (OpticModule.this)#Optic[GetWhole1, SetWholeBefore1, SetPiece2, GetError1, SetError1, GetPiece2, SetWholeAfter1]): (OpticModule.this)#Optic[GetWhole1, SetWholeBefore1, (SetPiece, SetPiece2), GetError1, SetError1, (GetPiece, GetPiece2), SetWholeAfter1]
A symbolic alias for
zip
. - final def <>[GetWhole1 <: GetWhole, SetWholeBefore1 <: SetWholeBefore, SetPiece1 <: SetPiece, GetError2, SetError2, GetPiece1 >: GetPiece, SetWholeAfter1 >: SetWholeAfter](that: => (OpticModule.this)#Optic[GetWhole1, SetWholeBefore1, SetPiece1, GetError2, SetError2, GetPiece1, SetWholeAfter1]): (OpticModule.this)#Optic[GetWhole1, SetWholeBefore1, SetPiece1, GetError2, SetError2, GetPiece1, SetWholeAfter1]
A symbolic alias for
orElse
. - final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def apply(whole: GetWhole with SetWholeBefore): (OpticModule.this)#OpticPartiallyApplied[SetPiece, GetError, SetError, GetPiece, SetWholeAfter]
Applies this optic to the specified whole, returning a new optic that no longer needs a whole to get and set and always gets and sets a piece of the specified whole.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def get(whole: GetWhole): (OpticModule.this)#OpticResult[GetError, GetPiece]
Gets a piece of the specified whole.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val getOptic: (GetWhole) => (OpticModule.this)#OpticResult[(GetError, SetWholeAfter), GetPiece]
- 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()
- final def orElse[GetWhole1 <: GetWhole, SetWholeBefore1 <: SetWholeBefore, SetPiece1 <: SetPiece, GetError2, SetError2, GetPiece1 >: GetPiece, SetWholeAfter1 >: SetWholeAfter](that: => (OpticModule.this)#Optic[GetWhole1, SetWholeBefore1, SetPiece1, GetError2, SetError2, GetPiece1, SetWholeAfter1]): (OpticModule.this)#Optic[GetWhole1, SetWholeBefore1, SetPiece1, GetError2, SetError2, GetPiece1, SetWholeAfter1]
Constructs a new optic that attempts to get and set with this optic, but if getting or setting fails falls back to getting or setting with that optic.
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val setOptic: (SetPiece) => (SetWholeBefore) => (OpticModule.this)#OpticResult[(SetError, SetWholeAfter), SetWholeAfter]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- 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()
- final def zip[GetWhole1 <: GetWhole, SetWholeBefore1 >: SetWholeAfter <: SetWholeBefore, SetPiece2, GetError1 >: GetError, SetError1 >: SetError, GetPiece2, SetWholeAfter1 >: SetWholeAfter](that: (OpticModule.this)#Optic[GetWhole1, SetWholeBefore1, SetPiece2, GetError1, SetError1, GetPiece2, SetWholeAfter1]): (OpticModule.this)#Optic[GetWhole1, SetWholeBefore1, (SetPiece, SetPiece2), GetError1, SetError1, (GetPiece, GetPiece2), SetWholeAfter1]
Constructs a new optic that gets and sets with both this optic and that optic.
Constructs a new optic that gets and sets with both this optic and that optic. This optic and that optic must get and set different pieces of the whole.