public class UriMatchTemplate extends UriTemplate implements UriMatcher
UriTemplate and adds the ability to match a URI to a given template using the
 UriMatcher.match(java.net.URI) method.| Modifier and Type | Class and Description | 
|---|---|
| protected static class  | UriMatchTemplate.DefaultUriMatchInfoThe default  UriMatchInfoimplementation. | 
| protected static class  | UriMatchTemplate.UriMatchTemplateParserExtended version of  UriTemplate.UriTemplateParserthat builds a regular expression to match a path. | 
UriTemplate.PathSegment, UriTemplate.UriTemplateParser| Modifier and Type | Field and Description | 
|---|---|
| protected StringBuilder | pattern | 
| protected static String | VARIABLE_MATCH_PATTERN | 
| protected List<UriMatchVariable> | variables | 
templateString| Modifier | Constructor and Description | 
|---|---|
|   | UriMatchTemplate(CharSequence templateString)Construct a new URI template for the given template. | 
| protected  | UriMatchTemplate(CharSequence templateString,
                List<UriTemplate.PathSegment> segments,
                Pattern matchPattern,
                List<UriMatchVariable> variables) | 
| protected  | UriMatchTemplate(CharSequence templateString,
                Object... parserArguments)Construct a new URI template for the given template. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected UriTemplate.UriTemplateParser | createParser(String templateString,
            Object... parserArguments)Creates a parser. | 
| List<String> | getVariableNames() | 
| List<UriMatchVariable> | getVariables() | 
| Optional<UriMatchInfo> | match(String uri)Match the given URI string. | 
| UriMatchTemplate | nest(CharSequence uriTemplate)Nests another URI template with this template. | 
| protected UriMatchTemplate | newUriMatchTemplate(CharSequence uriTemplate,
                   List<UriTemplate.PathSegment> newSegments,
                   Pattern newPattern,
                   List<UriMatchVariable> variables) | 
| protected UriTemplate | newUriTemplate(CharSequence uriTemplate,
              List<UriTemplate.PathSegment> newSegments) | 
| static UriMatchTemplate | of(String uri)Create a new  UriTemplatefor the given URI. | 
| String | toPathString()Returns the path string excluding any query variables. | 
buildNestedSegments, compareTo, equals, expand, expand, getPathVariableSegmentCount, getRawSegmentCount, getRawSegmentLength, getVariableSegmentCount, hashCode, nest, normalizeNested, toString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitmatchprotected static final String VARIABLE_MATCH_PATTERN
protected StringBuilder pattern
protected List<UriMatchVariable> variables
public UriMatchTemplate(CharSequence templateString)
templateString - The template stringprotected UriMatchTemplate(CharSequence templateString, Object... parserArguments)
templateString - The template stringparserArguments - The parsed argumentsprotected UriMatchTemplate(CharSequence templateString, List<UriTemplate.PathSegment> segments, Pattern matchPattern, List<UriMatchVariable> variables)
templateString - The templatesegments - The list of segmentsmatchPattern - The match patternvariables - The variablesprotected UriMatchTemplate newUriMatchTemplate(CharSequence uriTemplate, List<UriTemplate.PathSegment> newSegments, Pattern newPattern, List<UriMatchVariable> variables)
uriTemplate - The templatenewSegments - The list of new segmentsnewPattern - The list of new pattersvariables - The variablesUriMatchTemplatepublic List<String> getVariableNames()
public List<UriMatchVariable> getVariables()
public String toPathString()
public Optional<UriMatchInfo> match(String uri)
match in interface UriMatcheruri - The uRIpublic UriMatchTemplate nest(CharSequence uriTemplate)
UriTemplatenest in class UriTemplateuriTemplate - The URI template. If it does not begin with forward slash it will automatically be appended with forward slashpublic static UriMatchTemplate of(String uri)
UriTemplate for the given URI.uri - The URIprotected UriTemplate newUriTemplate(CharSequence uriTemplate, List<UriTemplate.PathSegment> newSegments)
newUriTemplate in class UriTemplateuriTemplate - The URI templatenewSegments - The new segmentsUriTemplateprotected UriTemplate.UriTemplateParser createParser(String templateString, Object... parserArguments)
UriTemplatecreateParser in class UriTemplatetemplateString - The templateparserArguments - The parsed arguments