This class can be compared to other path templates, with templates that are considered lower have a higher priority, and should be checked first.
This comparison can also be used to check for semantically equal paths, if a.compareTo(b) == 0 then the two paths are equivalent, which will generally result in a deployment exception.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final Set | |
| pack-priv final List | |
| private final boolean | |
| private final String | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| private | PathTemplate(String templateString, final boolean template, final String base, final List<PathTemplate.
|
| Modifier and Type | Method and Description |
|---|---|
| public int | compareTo(final PathTemplate
the object to be compared. o)Implements java. Compares this object with the specified object for order. |
| public static PathTemplate | |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. Indicates whether some other object is "equal to" this one. |
| public String | |
| public Set | |
| public String | |
| public int | |
| public boolean | |
| public String |
| base | back to summary |
|---|---|
| private final String base | |
| parameterNames | back to summary |
|---|---|
| private final Set<String> parameterNames | |
| parts | back to summary |
|---|---|
| pack-priv final List<PathTemplate. | |
| template | back to summary |
|---|---|
| private final boolean template | |
| templateString | back to summary |
|---|---|
| private final String templateString | |
| trailingSlash | back to summary |
|---|---|
| private final boolean trailingSlash | |
| PathTemplate | back to summary |
|---|---|
| private PathTemplate(String templateString, final boolean template, final String base, final List<PathTemplate. | |
| compareTo | back to summary |
|---|---|
| public int compareTo(final PathTemplate o) Implements java. Doc from java. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| create | back to summary |
|---|---|
| public static PathTemplate create(final String inputPath) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getBase | back to summary |
|---|---|
| public String getBase() | |
| getParameterNames | back to summary |
|---|---|
| public Set | |
| getTemplateString | back to summary |
|---|---|
| public String getTemplateString() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| matches | back to summary |
|---|---|
| public boolean matches(final String path, final Map<String, String> pathParameters) Check if the given uri matches the template. If so then it will return true and place the value of any path parameters into the given map. Note the map may be modified even if the match in unsuccessful, however in this case it will be emptied before the method returns | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final String | |
| pack-priv final boolean |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public String |
| part | back to summary |
|---|---|
| pack-priv final String part | |
| template | back to summary |
|---|---|
| pack-priv final boolean template | |
| Part | back to summary |
|---|---|
| private Part(final boolean template, final String part) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |