public final class RouteParameters extends Object implements Serializable
| Constructor and Description |
|---|
RouteParameters(Map<String,String> params)
Creates a RouteParameters container using the given map as argument.
|
RouteParameters(RouteParam... params)
Creates a RouteParameters container using the given
RouteParams. |
RouteParameters(String name,
String value)
Creates a RouteParameters instance using only one parameter.
|
| Modifier and Type | Method and Description |
|---|---|
static RouteParameters |
empty()
Creates an empty RouteParameters instance.
|
boolean |
equals(Object obj) |
Optional<String> |
get(String parameterName)
Gets the string representation of a parameter.
|
Optional<Integer> |
getInteger(String parameterName)
Gets the int representation of a parameter.
|
Optional<Long> |
getLong(String parameterName)
Gets the long representation of a parameter.
|
Set<String> |
getParameterNames()
Gets the available parameter names.
|
List<String> |
getWildcard(String parameterName)
Gets a list representing the wildcard value of a parameter, where each
element in the list is a path segment.
|
int |
hashCode() |
String |
toString() |
public RouteParameters(Map<String,String> params)
params - parameters mapping containing the parameter names mapping
their values.public RouteParameters(RouteParam... params)
RouteParams.params - the list of parameters and their values.IllegalArgumentException - if a parameter is given more than once.public static RouteParameters empty()
public Set<String> getParameterNames()
public Optional<String> get(String parameterName)
public Optional<Integer> getInteger(String parameterName)
parameterName - the name of the parameter.Optional Integer representation of the
parameter. If the value is missing the Optional is empty.NumberFormatException - if the value cannot be parsed as an Integer.public Optional<Long> getLong(String parameterName)
parameterName - the name of the parameter.Optional Long representation of the parameter.
If the value is missing the Optional is empty.NumberFormatException - if the value cannot be parsed as a Long.public List<String> getWildcard(String parameterName)
List.Copyright © 2025. All rights reserved.