public static class CaseBuilder.InCaseOfBuilderExtractor<T,R,X>
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
class |
CaseBuilder.InCaseOfBuilderExtractor.InCaseOfStep<V> |
class |
CaseBuilder.InCaseOfBuilderExtractor.InCaseOfValueStep<V,X> |
class |
CaseBuilder.InCaseOfBuilderExtractor.InMatchOf<V> |
| Constructor and Description |
|---|
InCaseOfBuilderExtractor() |
| Modifier and Type | Method and Description |
|---|---|
<V> Step<V,X> |
isMatch(org.hamcrest.Matcher<V> match)
Add a Hamcrest Matcher as a Predicate for this Case
|
<V> Step<V,X> |
isTrue(java.util.function.Predicate<V> match)
Add Predicate for this Case
|
<V> MatchingInstance<T,X> |
isType(ActionWithReturn<V,X> a)
Construct a Case that will trigger when user input is the same type (V) as supplied ActionWithReturn
If triggered the ActionWithReturn will be executed and it's result will be the match result.
|
<V> Step<V,X> |
isValue(V value)
Build a Case which is triggered when the user input matches the supplied Value (via Objects.equals)
|
public <V> Step<V,X> isTrue(java.util.function.Predicate<V> match)
match - Predicate to trigger case onpublic <V> Step<V,X> isMatch(org.hamcrest.Matcher<V> match)
match - Hamcrest Matcher to trigger casepublic <V> MatchingInstance<T,X> isType(ActionWithReturn<V,X> a)
a - Action for the new Case, Predicate for the Case will be created from the input type to the Action.