/** * Sets a {@link Supplier} to execute if this matches. */ public FluentMatchingR<T, R> get(Supplier<R> supplier) { return get(fluentMatchingR, supplier); } }
/** * Specifies an match on a decomposing matcher with 0 extracted fields and then returns a fluent * interface for specifying the action to take if the value matches this case. */ public <U extends T> OngoingMatchingR0<T, U, R> when( DecomposableMatchBuilder0<U> decomposableMatchBuilder) { return new OngoingMatchingR0<>(this, decomposableMatchBuilder.build()); }
}) .when(headNil(eq("q"))) .get( () -> {
/** * Specifies an exact match and then returns a fluent interface for specifying the action to take * if the value matches this case. */ public <U extends T> OngoingMatchingR0<T, U, R> when(MatchesExact<U> o) { List<Matcher<Object>> matchers = Lists.of(ArgumentMatchers.eq(o.t)); return new OngoingMatchingR0<>( this, new DecomposableMatchBuilder0<>(matchers, new IdentityFieldExtractor<U>()).build()); }