@Test public void shouldMatchUrlWithFormat() { assertTrue(patternFormat.matches("/xxx/toddf/yyy/joez.json")); assertTrue(patternFormat.matches("/xxx/toddf/yyy/joez.")); assertTrue(patternFormat.matches("/xxx/todd.fredrich/yyy/joez.json")); assertTrue(patternFormat.matches("/xxx/[toddf]:1/yyy/joez.json")); assertTrue(patternFormat.matches("/xxx/12345/yyy/67890.json")); assertTrue(patternFormat.matches("/xxx/toddf/yyy/joez.xml")); assertTrue(patternFormat.matches("/xxx/toddf/yyy/joez.json?x=y&a=b")); assertTrue(patternFormat.matches("/xxx/toddf/yyy/joez")); assertTrue(patternFormat.matches("/xxx/v1_0_1/yyy/yada")); assertTrue(patternFormat.matches("/xxx/v1_0_1/yyy/yada.json")); assertTrue(patternFormat.matches("/xxx/v1_0_1/yyy/yada.json?x=y&a=b")); assertTrue(patternFormat.matches("/xxx/toddf/yyy/jose.js%20on")); assertTrue(patternFormat.matches("/xxx/toddf/yyy/jose.%20json")); assertTrue(patternFormat.matches("/xxx/toddf/yyy/jose.%json")); assertTrue(patternFormat.matches("/xxx/$-_@&+-[]/yyy/!*'(),.json")); assertTrue(patternFormat.matches("/xxx/toddf/yyy/.json")); assertTrue(patternFormat.matches("/xxx/.toddf/yyy/.json?a=foo")); }
@Override public boolean matches(String url) { return match(url) != null; }
UrlPattern implements UrlMatcher { @Override public boolean matches(String url) { return match(url) != null; } }
UrlPattern implements UrlMatcher { @Override public boolean matches(String url) { return match(url) != null; } UrlPattern(String path); }
UrlPattern implements UrlMatcher { @Override public boolean matches(String url) { return match(url) != 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 boolean matches(String url) { return match(url) != 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);  }