public class UriTemplate
extends java.lang.Object
This class provides methods to validate the syntax of URI templates and check if a given URI matches a specified template.
构造器和说明 |
---|
UriTemplate(java.lang.String template)
Constructor to create a new UriTemplate instance.
|
限定符和类型 | 方法和说明 |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getTemplate() |
int |
hashCode() |
boolean |
matchesTemplate(java.lang.String uri)
Checks if a given URI matches the compiled template pattern.
|
java.lang.String |
toString()
Returns the original template string.
|
public UriTemplate(java.lang.String template)
template
- The URI template stringjava.lang.IllegalArgumentException
- if the template is invalid or too longpublic java.lang.String getTemplate()
public java.lang.String toString()
toString
在类中 java.lang.Object
public boolean matchesTemplate(java.lang.String uri)
uri
- The URI to checkpublic int hashCode()
hashCode
在类中 java.lang.Object
public boolean equals(java.lang.Object obj)
equals
在类中 java.lang.Object