java.lang.Comparable<PathTemplate>
public class PathTemplate extends java.lang.Object implements java.lang.Comparable<PathTemplate>
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 | Method | Description |
---|---|---|
int |
compareTo(PathTemplate o) |
|
static PathTemplate |
create(java.lang.String inputPath) |
|
boolean |
equals(java.lang.Object o) |
|
java.lang.String |
getBase() |
|
java.util.Set<java.lang.String> |
getParameterNames() |
|
java.lang.String |
getTemplateString() |
|
int |
hashCode() |
|
boolean |
matches(java.lang.String path,
java.util.Map<java.lang.String,java.lang.String> pathParameters) |
Check if the given uri matches the template.
|
java.lang.String |
toString() |
public static PathTemplate create(java.lang.String inputPath)
public boolean matches(java.lang.String path, java.util.Map<java.lang.String,java.lang.String> pathParameters)
Note the map may be modified even if the match in unsuccessful, however in this case it will be emptied before the method returns
path
- The request path, relative to the context rootpathParameters
- The path parameters map to fill outpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(PathTemplate o)
compareTo
in interface java.lang.Comparable<PathTemplate>
public java.lang.String getBase()
public java.lang.String getTemplateString()
public java.util.Set<java.lang.String> getParameterNames()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2018. All rights reserved.