public final class ParamsRequestCondition extends AbstractRequestCondition<ParamsRequestCondition>
RequestMapping.params()
.Constructor and Description |
---|
ParamsRequestCondition(java.lang.String... params)
Create a new instance from the given param expressions.
|
Modifier and Type | Method and Description |
---|---|
ParamsRequestCondition |
combine(ParamsRequestCondition other)
Returns a new instance with the union of the param expressions
from "this" and the "other" instance.
|
int |
compareTo(ParamsRequestCondition other,
ServerWebExchange exchange)
Compare to another condition based on parameter expressions.
|
protected java.util.Collection<org.springframework.web.reactive.result.condition.ParamsRequestCondition.ParamExpression> |
getContent()
Return the discrete items a request condition is composed of.
|
java.util.Set<NameValueExpression<java.lang.String>> |
getExpressions()
Return the contained request parameter expressions.
|
ParamsRequestCondition |
getMatchingCondition(ServerWebExchange exchange)
Returns "this" instance if the request matches all param expressions;
or
null otherwise. |
protected java.lang.String |
getToStringInfix()
The notation to use when printing discrete items of content.
|
equals, hashCode, isEmpty, toString
public ParamsRequestCondition(java.lang.String... params)
params
- expressions with syntax defined in RequestMapping.params()
;
if 0, the condition will match to every request.public java.util.Set<NameValueExpression<java.lang.String>> getExpressions()
protected java.util.Collection<org.springframework.web.reactive.result.condition.ParamsRequestCondition.ParamExpression> getContent()
AbstractRequestCondition
For example URL patterns, HTTP request methods, param expressions, etc.
getContent
in class AbstractRequestCondition<ParamsRequestCondition>
null
protected java.lang.String getToStringInfix()
AbstractRequestCondition
For example " || "
for URL patterns or " && "
for param expressions.
getToStringInfix
in class AbstractRequestCondition<ParamsRequestCondition>
public ParamsRequestCondition combine(ParamsRequestCondition other)
other
- the condition to combine with.public ParamsRequestCondition getMatchingCondition(ServerWebExchange exchange)
null
otherwise.null
otherwise.public int compareTo(ParamsRequestCondition other, ServerWebExchange exchange)
It is assumed that both instances have been obtained via
getMatchingCondition(ServerWebExchange)
and each instance
contains the matching parameter expressions only or is otherwise empty.