X - public class ElementCase<X> extends CaseBeingBuilt
| Constructor and Description |
|---|
ElementCase() |
| Modifier and Type | Method and Description |
|---|---|
<V> CaseBuilder.InMatchOfBuilder<V,X> |
allMatch(org.hamcrest.Matcher<V>... matchers)
Build a Case which is triggered when all of the supplied Hamcrest Matchers holds
|
<V> CaseBuilder.InMatchOfBuilder<V,X> |
anyMatch(org.hamcrest.Matcher<V>... matchers)
Build a Case which is triggered when any of the supplied Hamcrest Matchers holds
|
<T,R,X> CaseBuilder.InCaseOfBuilderExtractor<T,R,X> |
extract(Extractor<T,R> extractor)
Preprocess the user supplied matching data in some way before it meets the predicate or action for this Case
|
<V> CaseBuilder.InMatchOfBuilder<V,X> |
isMatch(org.hamcrest.Matcher<V> match)
Build a Case which is triggered when the supplied Hamcrest Matcher holds
|
<V> CaseBuilder.InCaseOfBuilder<V> |
isTrue(java.util.function.Predicate<V> match)
Build a Case which is triggered when the supplied Predicate holds
|
<T,R> MatchingInstance<T,R> |
isType(TypedFunction<T,R> a)
Create a completed Case which is triggered when matching input is of the same type (T) as the input parameter to ActionWithReturn.
|
<V> Step<V,X> |
isValue(V value)
Build a Case which is triggered when the user input matches the supplied Value (via Objects.equals)
|
<V> CaseBuilder.InMatchOfBuilder<V,X> |
noneMatch(org.hamcrest.Matcher<V>... matchers)
Build a Case which is triggered when none of the supplied Hamcrest Matchers holds
|
public <V> Step<V,X> isValue(V value)
value - will be compared to input provided in match methodpublic <T,R> MatchingInstance<T,R> isType(TypedFunction<T,R> a)
a - Action for the new Case, Predicate for the Case will be created from the input type to the Action.public <V> CaseBuilder.InCaseOfBuilder<V> isTrue(java.util.function.Predicate<V> match)
match - Predicate which will trigger this casepublic <V> CaseBuilder.InMatchOfBuilder<V,X> isMatch(org.hamcrest.Matcher<V> match)
match - Hamcrest Matcher that will trigger this case@SafeVarargs public final <V> CaseBuilder.InMatchOfBuilder<V,X> allMatch(org.hamcrest.Matcher<V>... matchers)
matchers - Hamcrest Matchers that will trigger this case@SafeVarargs public final <V> CaseBuilder.InMatchOfBuilder<V,X> anyMatch(org.hamcrest.Matcher<V>... matchers)
matchers - Hamcrest Matchers that will trigger this case@SafeVarargs public final <V> CaseBuilder.InMatchOfBuilder<V,X> noneMatch(org.hamcrest.Matcher<V>... matchers)
matchers - Hamcrest Matchers that will trigger this casepublic <T,R,X> CaseBuilder.InCaseOfBuilderExtractor<T,R,X> extract(Extractor<T,R> extractor)
extractor - Extractor to preprocess input data