| Modifier and Type | Method and Description |
|---|---|
Collection<String> |
allowedMethods()
Get all allowed methods for the route if
status() is Router.Status.SUCCESS or
Router.Status.METHOD_NOT_ALLOWED. |
static <T> Router.Result<T> |
capturing(int captures)
Create a new
Router.Result with enough capacity to hold captures captured
parameters. |
boolean |
isSuccess()
Convenience method for checking if the routing status is
Router.Status.SUCCESS. |
String |
paramName(int i)
Get the name of the captured path parameter at index {code i}.
|
int |
params()
Get the number of captured parameter values.
|
ParameterType |
paramType(int i)
Get the parameter type of the captured path parameter at index
i. |
CharSequence |
paramValue(int i)
Get the value of the captured path parameter at index {code i}.
|
CharSequence |
paramValueDecoded(int i)
Get the URL decoded value of the captured path parameter at index {code i}.
|
int |
paramValueEnd(int i)
Get end offset into the routed path of the captured parameter at index {code i}.
|
int |
paramValueStart(int i)
Get start offset into the routed path of the captured parameter at index {code i}.
|
CharSequence |
query()
Get query string.
|
int |
queryEnd()
Get query string end index.
|
int |
queryStart()
Get query string start index.
|
Router.Status |
status()
Get routing status of the
Router.route(java.lang.CharSequence, java.lang.CharSequence, io.norberg.rut.Router.Result<T>) invocation. |
T |
target()
Get routing target, if successful.
|
public static <T> Router.Result<T> capturing(int captures)
Router.Result with enough capacity to hold captures captured
parameters.public Router.Status status()
Router.route(java.lang.CharSequence, java.lang.CharSequence, io.norberg.rut.Router.Result<T>) invocation.public boolean isSuccess()
Router.Status.SUCCESS.public T target()
public int params()
public String paramName(int i)
public CharSequence paramValue(int i)
public CharSequence paramValueDecoded(int i)
public ParameterType paramType(int i)
i.public int paramValueStart(int i)
paramValue(int),
paramValueEnd(int)public int paramValueEnd(int i)
paramValue(int),
paramValueStart(int)public int queryStart()
public int queryEnd()
public CharSequence query()
public Collection<String> allowedMethods()
status() is Router.Status.SUCCESS or
Router.Status.METHOD_NOT_ALLOWED. Returns an empty collection if status() is Router.Status.NOT_FOUND.Copyright © 2015. All Rights Reserved.