Lens.Instance<A2,B2>
Constructor and Description |
---|
Proj2() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
toString() |
(F,G2) |
update(G2 newValue,
(F,G) pair)
Combines a value of the output field type with a value of the input object type to produce a combined value
of the output object type.
|
G |
view((F,G) pair)
Extracts a value of the input field type from the input object type.
|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
compose, composeUnchecked, upCast
public G view((F,G) pair)
Lens
This method is analogous to a "getter" in traditional object-oriented programming.
public (F,G2) update(G2 newValue, (F,G) pair)
Lens
This method is analogous to a "setter" in traditional object-oriented programming. Note that the given
field b
does not necessarily have to correspond with the straightforward transformation from the
input object to the output object.
update
in interface Lens<(F,G)::G,(F,G2)::G2>
newValue
- A value of the output field type with which to update the output object.pair
- A value of the input object type to be converted to a value of the output object type.