X - Type to be passed to matchpublic class IterableCase<X> extends CaseBeingBuilt
| Constructor and Description |
|---|
IterableCase() |
| Modifier and Type | Method and Description |
|---|---|
<R,V,T> ExtractionStep<T,R,X> |
allHoldNoType(java.lang.Object... predicates)
Each supplied value will be checked against an element from the iterable
Each supplied value could be a comparison value, JDK 8 Predicate, or Hamcrest Matcher
Note if there is more elements in the iterable than predicates (or matchers / prototype values etc), and all predicates hold this case will trigger
|
<R,V,T,X> CaseBuilder.InMatchOfManyStep2<R,V,T,X> |
allMatch(org.hamcrest.Matcher<V>... predicates)
Each supplied Hamcrest Matcher will be matched against elements in the matching iterable
Note if there is more elements in the iterable than matchers, and all predicates hold this case will trigger
|
<R,V,T,X> ExtractionStep<T,R,X> |
allMatchNoType(org.hamcrest.Matcher... predicates)
Each supplied Hamcrest Matcher will be matched against elements in the matching iterable
Note if there is more elements in the iterable than matchers, and all predicates hold this case will trigger
|
<V> CaseBuilder.InCaseOfManyStep2<V> |
allTrue(java.util.function.Predicate<V>... predicates)
All of the predicates hold
Each predicate will be matched in turn against a member of the iterable
Note if there is more elements in the iterable than predicates, and all predicates hold this case will trigger
|
<R,V,T,X> ExtractionStep<T,R,X> |
allTrueNoType(java.util.function.Predicate<? extends java.lang.Object>... predicates)
Each predicate will be matched in turn against a member of the iterable
Note if there is more elements in the iterable than predicates, and all predicates hold this case will trigger
|
<V,T,X> Step<java.util.List<V>,X> |
allValues(V... values)
Check all supplied values against elements in the iterable in turn
Note if there is more elements in the iterable than values to match against and all values match this case will trigger
|
<T,R,V,V1> ExtractionStep<T,R,X> |
bothMatch(org.hamcrest.Matcher<V> pred1,
org.hamcrest.Matcher<V1> pred2)
Check that two Matchers accepting potential different types hold
Will check against the first two elements of an iterable only.
|
<R,V,V1,T,X> |
bothTrue(java.util.function.Predicate<V> pred1,
java.util.function.Predicate<V1> pred2)
Check that two predicates accepting potential different types hold
Will check against the first two elements of an iterable only.
|
<R,V,V1,V2,T,X> |
threeTrue(java.util.function.Predicate<V> pred1,
java.util.function.Predicate<V1> pred2,
java.util.function.Predicate<V2> pred3)
Check that three predicates accepting potential different types hold
Will check against the first three elements of an iterable only.
|
@SafeVarargs public final <V> CaseBuilder.InCaseOfManyStep2<V> allTrue(java.util.function.Predicate<V>... predicates)
predicates - Predicates to test the elements of provided iterable againstpublic final <R,V,V1,T,X> ExtractionStep<T,R,X> bothTrue(java.util.function.Predicate<V> pred1, java.util.function.Predicate<V1> pred2)
pred1 - Predicate to match against the first element in the iterablepred2 - Predicate to match against the second element in the iterablepublic final <R,V,V1,V2,T,X> ExtractionStep<T,R,X> threeTrue(java.util.function.Predicate<V> pred1, java.util.function.Predicate<V1> pred2, java.util.function.Predicate<V2> pred3)
pred1 - Predicate to match against the first element in the iterablepred2 - Predicate to match against the second element in the iterablepred3 - Predicate to match against the third element in the iterable@SafeVarargs public final <R,V,T,X> ExtractionStep<T,R,X> allTrueNoType(java.util.function.Predicate<? extends java.lang.Object>... predicates)
predicates - Predicates to test the elements of provided iterable against@SafeVarargs public final <R,V,T> ExtractionStep<T,R,X> allHoldNoType(java.lang.Object... predicates)
predicates - comparison value, JDK 8 Predicate, or Hamcrest Matcher to compare to elements in an Iterable@SafeVarargs public final <R,V,T,X> CaseBuilder.InMatchOfManyStep2<R,V,T,X> allMatch(org.hamcrest.Matcher<V>... predicates)
predicates - Hamcrest Matchers to be matched against elements in the matching iterablepublic final <T,R,V,V1> ExtractionStep<T,R,X> bothMatch(org.hamcrest.Matcher<V> pred1, org.hamcrest.Matcher<V1> pred2)
pred1 - Matcher to match against the first element in the iterablepred2 - Matcher to match against the second element in the iterable@SafeVarargs public final <R,V,T,X> ExtractionStep<T,R,X> allMatchNoType(org.hamcrest.Matcher... predicates)
predicates - Hamcrest Matchers to be matched against elements in the matching iterable@SafeVarargs public final <V,T,X> Step<java.util.List<V>,X> allValues(V... values)
values - to match against (via Objects.equals)