public class UriTemplate extends Object
This class provides methods to validate the syntax of URI templates and check if a given URI matches a specified template.
| Constructor and Description |
|---|
UriTemplate(String template)
Constructor to create a new UriTemplate instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getTemplate() |
int |
hashCode() |
boolean |
matchesTemplate(String uri)
Checks if a given URI matches the compiled template pattern.
|
String |
toString()
Returns the original template string.
|
public UriTemplate(String template)
template - The URI template stringIllegalArgumentException - if the template is invalid or too longpublic String getTemplate()
public String toString()
public boolean matchesTemplate(String uri)
uri - The URI to checkCopyright © 2025. All rights reserved.