@Test public void testParameterizedPattern() { ParameterizedPattern pattern = new ParameterizedPattern("/hello/:name/id/:id"); ParameterizedPattern.Matcher matcher = pattern.matcher("/hello/world/id/123"); assertThat(matcher.matches(), is(true)); assertThat(matcher.parameters().size(), equalTo(2)); assertThat(matcher.parameters().get("name"), equalTo("world")); assertThat(matcher.parameters().get("id"), equalTo("123")); assertThat(pattern.matcher("/lorem/ipsum").matches(), is(false)); }
public ParameterizedPattern(String input) { this.pattern = input; this.supplier = createMatcherSupplier(input); }
ParameterizedPattern { public ParameterizedPattern(String input) { this.pattern = input; this.supplier = createMatcherSupplier(input); } }
ParameterizedPattern { public ParameterizedPattern(String input) { this.pattern = input; this.supplier = createMatcherSupplier(input); } ParameterizedPattern(String input); }
ParameterizedPattern { public ParameterizedPattern(String input) { this.pattern = input; this.supplier = createMatcherSupplier(input); } ParameterizedPattern(String input); boolean matches(String path); Matcher matcher(String path); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
ParameterizedPattern { public ParameterizedPattern(String input) { this.pattern = input; this.supplier = createMatcherSupplier(input); } ParameterizedPattern(String input); boolean matches(String path); Matcher matcher(String path); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }