X - Return type from the Pattern Matching expressionpublic class CheckTypeAndValues<X> extends CaseBeingBuilt
| Modifier and Type | Class and Description |
|---|---|
class |
CheckTypeAndValues.AndMembersMatchBuilder<T,R> |
| Constructor and Description |
|---|
CheckTypeAndValues() |
| Modifier and Type | Method and Description |
|---|---|
<T,R> CheckTypeAndValues.AndMembersMatchBuilder<T,R> |
isType(ActionWithReturn<T,R> a)
Build a Case where we will check if user input matches the Type of the input params on the ActionWithReturn instance supplied
If it does, the ActionWithReturn will be executed (applied) to get the result of the Match.
|
public <T,R> CheckTypeAndValues.AndMembersMatchBuilder<T,R> isType(ActionWithReturn<T,R> a)
a - Action from which the Predicate (by param type) and Function will be extracted to build a Pattern Matching caseExtractors.decompose(),
Extractors.registerDecompositionFunction(java.lang.Class<T>, java.util.function.Function<T, R>)