@Test public void shouldParseParametersWithPeriods() { UrlMatch match = pattern.match("/xxx/1.0/yyy/67890?x=y&a=b"); assertNotNull(match); assertNull(match.get("format")); assertEquals("1.0", match.get("a_id")); assertEquals("67890", match.get("b_id")); }
@Override public UrlMatch match(String url) { Matcher matcher = compiledUrl.matcher(url); if (matcher.matches()) { return new UrlMatch(extractParameters(matcher)); } return null; }
UrlPattern implements UrlMatcher { @Override public UrlMatch match(String url) { Matcher matcher = compiledUrl.matcher(url); if (matcher.matches()) { return new UrlMatch(extractParameters(matcher)); } return null; } }
UrlPattern implements UrlMatcher { @Override public UrlMatch match(String url) { Matcher matcher = compiledUrl.matcher(url); if (matcher.matches()) { return new UrlMatch(extractParameters(matcher)); } return null; } UrlPattern(String path); }
UrlPattern implements UrlMatcher { @Override public UrlMatch match(String url) { Matcher matcher = compiledUrl.matcher(url); if (matcher.matches()) { return new UrlMatch(extractParameters(matcher)); } return null; } UrlPattern(String path); void compile(); @Override boolean matches(String url); @Override UrlMatch match(String url); String getPattern(); List<String> getParameterNames(); @Override String toRegexPattern(String url); }
UrlPattern implements UrlMatcher { @Override public UrlMatch match(String url) { Matcher matcher = compiledUrl.matcher(url); if (matcher.matches()) { return new UrlMatch(extractParameters(matcher)); } return null; } UrlPattern(String path); void compile(); @Override boolean matches(String url); @Override UrlMatch match(String url); String getPattern(); List<String> getParameterNames(); @Override String toRegexPattern(String url);  }