Class AbstractRequestCondition<T extends AbstractRequestCondition<T>>
- java.lang.Object
- org.springframework.web.servlet.mvc.condition.AbstractRequestCondition<T>
- Type Parameters:
T
- the type of objects that this RequestCondition can be combined with and compared to
- All Implemented Interfaces:
RequestCondition<T>
- Direct Known Subclasses:
CompositeRequestCondition
,ConsumesRequestCondition
,HeadersRequestCondition
,ParamsRequestCondition
,PatternsRequestCondition
,ProducesRequestCondition
,RequestConditionHolder
,RequestMethodsRequestCondition
public abstract class AbstractRequestCondition<T extends AbstractRequestCondition<T>> extends Object implements RequestCondition<T>
A base class forRequestCondition
types providing implementations ofequals(Object)
,hashCode()
, andtoString()
.- Since:
- 3.1
- Author:
- Rossen Stoyanchev
Constructor Summary
Constructors Constructor Description AbstractRequestCondition()
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
protected abstract Collection<?>
getContent()
Return the discrete items a request condition is composed of.protected abstract String
getToStringInfix()
The notation to use when printing discrete items of content.int
hashCode()
boolean
isEmpty()
Indicates whether this condition is empty, i.e.String
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.web.servlet.mvc.condition.RequestCondition
combine, compareTo, getMatchingCondition
Constructor Detail
AbstractRequestCondition
public AbstractRequestCondition()
Method Detail
isEmpty
public boolean isEmpty()
Indicates whether this condition is empty, i.e. whether or not it contains any discrete items.- Returns:
true
if empty;false
otherwise
getContent
protected abstract Collection<?> getContent()
Return the discrete items a request condition is composed of.For example URL patterns, HTTP request methods, param expressions, etc.
- Returns:
- a collection of objects (never
null
)
getToStringInfix
protected abstract String getToStringInfix()
The notation to use when printing discrete items of content.For example
" || "
for URL patterns or" && "
for param expressions.