public final class ParamsRequestCondition extends AbstractRequestCondition<ParamsRequestCondition>
RequestMapping.params()
.Constructor and Description |
---|
ParamsRequestCondition(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,
HttpServletRequest request)
Returns:
0 if the two conditions have the same number of parameter expressions
Less than 0 if "this" instance has more parameter expressions
Greater than 0 if the "other" instance has more parameter expressions
|
protected Collection<org.springframework.web.servlet.mvc.condition.ParamsRequestCondition.ParamExpression> |
getContent()
Return the discrete items a request condition is composed of.
|
Set<NameValueExpression<String>> |
getExpressions()
Return the contained request parameter expressions.
|
ParamsRequestCondition |
getMatchingCondition(HttpServletRequest request)
Returns "this" instance if the request matches all param expressions;
or
null otherwise. |
protected String |
getToStringInfix()
The notation to use when printing discrete items of content.
|
equals, hashCode, toString
public ParamsRequestCondition(String... params)
params
- expressions with syntax defined in RequestMapping.params()
;
if 0, the condition will match to every request.public Set<NameValueExpression<String>> getExpressions()
protected Collection<org.springframework.web.servlet.mvc.condition.ParamsRequestCondition.ParamExpression> getContent()
AbstractRequestCondition
getContent
in class AbstractRequestCondition<ParamsRequestCondition>
null
protected String getToStringInfix()
AbstractRequestCondition
getToStringInfix
in class AbstractRequestCondition<ParamsRequestCondition>
public ParamsRequestCondition combine(ParamsRequestCondition other)
other
- the condition to combine with.public ParamsRequestCondition getMatchingCondition(HttpServletRequest request)
null
otherwise.null
if there is no matchpublic int compareTo(ParamsRequestCondition other, HttpServletRequest request)
It is assumed that both instances have been obtained via
getMatchingCondition(HttpServletRequest)
and each instance
contains the matching parameter expressions only or is otherwise empty.