T
- X
- public class MatchingInstance<T,X>
extends java.lang.Object
Constructor and Description |
---|
MatchingInstance() |
Modifier and Type | Method and Description |
---|---|
Maybe<X> |
match(java.lang.Object... t)
Aggregates supplied objects into a List for matching against
|
Maybe<X> |
match(java.lang.Object t) |
public Maybe<X> match(java.lang.Object... t)
assertThat(Cases.of(Case.of((List<Integer> input) -> input.size()==3, input -> "hello"), Case.of((List<Integer> input) -> input.size()==2, input -> "ignored"), Case.of((List<Integer> input) -> input.size()==1, input -> "world")).match(1,2,3).get(),is("hello"));
t
- Array to match on