public class URIPattern extends URITemplate implements Matchable
| Constructor and Description |
|---|
URIPattern(String template) |
URIPattern(String template,
boolean encode)
Creates a new URI Pattern instance from the specified URI template string.
|
URIPattern(URITemplate template)
Creates a new URI Pattern instance from an existing URI Template.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
hashCode() |
static boolean |
isMatchable(URITemplate template)
Indicates whether the given URI template can be used to construct a new URI Pattern instance.
|
boolean |
match(String uri)
Indicates whether this URI Pattern matches the specified URL.
|
Pattern |
pattern()
Returns the regular expression pattern corresponding to this URI pattern.
|
protected int |
score()
Returns the score for this URI pattern.
|
public URIPattern(String template, boolean encode) throws IllegalArgumentException
template - The string following the URI template syntax.URITemplateSyntaxException - If the string provided does not follow the proper syntax.IllegalArgumentExceptionpublic URIPattern(String template) throws IllegalArgumentException
IllegalArgumentExceptionpublic URIPattern(URITemplate template) throws IllegalArgumentException
template - The URI template to generate the pattern from.URITemplateSyntaxException - If the string provided does not follow the proper syntax.IllegalArgumentExceptionpublic static boolean isMatchable(URITemplate template)
Matchable interface.template - The template to test.true if the template is matchable; false otherwise.public boolean match(String uri)
public Pattern pattern()
public boolean equals(Object o)
equals in class URITemplatepublic int hashCode()
hashCode in class URITemplateprotected int score()
Copyright © 2014. All rights reserved.