public class RouteParameter extends Object
Constructor and Description |
---|
RouteParameter(int index,
String token,
String name,
String regex) |
Modifier and Type | Method and Description |
---|---|
int |
getIndex()
Gets the index of where the token starts in the original uri.
|
String |
getName()
The name of the parameter such as "id" in "{id: [0-9]+}"
|
String |
getRegex()
The regex of the parameter such as "[0-9]+" in "{id: [0-9]+}"
|
String |
getToken()
The exact string of the parameter such as "{id: [0-9]+}" in "{id: [0-9]+}"
|
static Map<String,RouteParameter> |
parse(String path)
Parse a path such as "/user/{id: [0-9]+}/email/{addr}" for the named
parameters.
|
public int getIndex()
public String getToken()
public String getName()
public String getRegex()
public static Map<String,RouteParameter> parse(String path)
path
- The path to parseCopyright © 2019 ninjaframework. All rights reserved.