public class UriPathTemplate
extends java.lang.Object
{, }), which can be expanded to produce an actual URI.| Constructor and Description |
|---|
UriPathTemplate(java.lang.String uriPattern)
Creates a new
UriPathTemplate from the given uriPattern. |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.Object> |
match(java.lang.String uri)
Matches the template against the given
uri returning a map of path parameters
extracted from the uri, keyed by the names in the template. |
boolean |
matches(java.lang.String uri)
Tests the given
uri against this template, returning true if the
uri matches the template, false otherwise. |
public UriPathTemplate(java.lang.String uriPattern)
UriPathTemplate from the given uriPattern.uriPattern - The pattern to be used by the templatepublic boolean matches(java.lang.String uri)
uri against this template, returning true if the
uri matches the template, false otherwise.uri - The uri to matchtrue if there's a match, false otherwisepublic java.util.Map<java.lang.String,java.lang.Object> match(java.lang.String uri)
uri returning a map of path parameters
extracted from the uri, keyed by the names in the template. If the uri does not match,
or there are no path parameters, an empty map is returned.uri - The uri to matchnull.