Prism.Instance<A2,B2>
Constructor and Description |
---|
Inj2() |
Modifier and Type | Method and Description |
---|---|
(F|G2) |
build(G2 g2)
Constructs a value of the output object type with the given output field value.
|
boolean |
equals(Object obj) |
((F|G2)|G) |
match((F|G) either)
Attempts to extract the input field from the input object.
|
String |
toString() |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
compose, composeUnchecked, upCast
public ((F|G2)|G) match((F|G) either)
Prism
For example, say that the input object type is DataResult
and the output
object type is Optional
. Calling match
with the data result will return either the
value present in the result (if a DataResult
is a success), or an absent
Optional
(if the result is an error).
public (F|G2) build(G2 g2)
Prism
For example, this may be used to construct an Optional
or DataResult
from a plain value.