@Test public void whenParameterPatternsAreGivenShouldMatchAccordingToGivenPatterns() throws Exception { ParametersControl control = new DefaultParametersControl("/any/{aParameter}/what", new ImmutableMap.Builder<String, String>().put("aParameter", "aaa\\d{3}bbb").build(), converters, evaluator); assertFalse(control.matches("/any/ICantPutAnythingInHere/what")); assertFalse(control.matches("/any/aaa12bbb/what")); assertTrue(control.matches("/any/aaa123bbb/what")); }
public boolean matches(String uri) { return pattern.matcher(uri).matches(); }
DefaultParametersControl implements ParametersControl { public boolean matches(String uri) { return pattern.matcher(uri).matches(); } }
DefaultParametersControl implements ParametersControl { public boolean matches(String uri) { return pattern.matcher(uri).matches(); } DefaultParametersControl(String originalPattern, Map<String, String> parameterPatterns, Converters converters, Evaluator evaluator);  DefaultParametersControl(String originalPattern, Converters converters, Evaluator evaluator); }
DefaultParametersControl implements ParametersControl { public boolean matches(String uri) { return pattern.matcher(uri).matches(); } DefaultParametersControl(String originalPattern, Map<String, String> parameterPatterns, Converters converters, Evaluator evaluator);  DefaultParametersControl(String originalPattern, Converters converters, Evaluator evaluator); String fillUri(String[] paramNames, Object... paramValues); boolean matches(String uri); void fillIntoRequest(String uri, MutableRequest request); String apply(String[] values); }
DefaultParametersControl implements ParametersControl { public boolean matches(String uri) { return pattern.matcher(uri).matches(); } DefaultParametersControl(String originalPattern, Map<String, String> parameterPatterns, Converters converters, Evaluator evaluator);  DefaultParametersControl(String originalPattern, Converters converters, Evaluator evaluator); String fillUri(String[] paramNames, Object... paramValues); boolean matches(String uri); void fillIntoRequest(String uri, MutableRequest request); String apply(String[] values);  }