public class URLPattern extends Object implements Comparable
| Modifier and Type | Field and Description |
|---|---|
static int |
PT_DEFAULT |
static int |
PT_EXACT |
static int |
PT_EXTENSION |
static int |
PT_PREFIX |
| Constructor and Description |
|---|
URLPattern() |
URLPattern(String urlPattern) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Object object) |
boolean |
equals(Object object) |
int |
getPatternDepth() |
boolean |
implies(URLPattern urlPattern)
Does this pattern imply (that is, match) the argument pattern? This method follows the same rules (in the same
order) as those used for mapping requests to servlets.
|
static boolean |
match(String originalPattern,
String newPattern)
Minor utility method which instantiates a pattern before comparing it against another.
|
int |
patternType() |
String |
toString() |
public static final int PT_DEFAULT
public static final int PT_EXTENSION
public static final int PT_PREFIX
public static final int PT_EXACT
public URLPattern()
public URLPattern(String urlPattern)
public int patternType()
public int compareTo(Object object)
compareTo in interface Comparablepublic boolean implies(URLPattern urlPattern)
Two URL patterns match if they are related as follows:
urlPattern - URLPattern whose path will be compared to this URLPatternpublic int getPatternDepth()
public static boolean match(String originalPattern, String newPattern)
originalPattern - The pattern to compare againstnewPattern - The pattern to compareCopyright © 2019. All rights reserved.