Package io.microsphere.spring.web.rule
Class AbstractWebRequestRule<T>
- java.lang.Object
-
- io.microsphere.spring.web.rule.AbstractWebRequestRule<T>
-
- All Implemented Interfaces:
WebRequestRule
- Direct Known Subclasses:
WebRequestConsumesRule
,WebRequestHeadersRule
,WebRequestMethodsRule
,WebRequestParamsRule
,WebRequestPattensRule
,WebRequestProducesRule
public abstract class AbstractWebRequestRule<T> extends java.lang.Object implements WebRequestRule
AbstractWebRequestRule
- Since:
- 1.0.0
- Author:
- Mercy
-
-
Constructor Summary
Constructors Constructor Description AbstractWebRequestRule()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
protected abstract java.util.Collection<T>
getContent()
Return the discrete items a request condition is composed of.protected abstract java.lang.String
getToStringInfix()
The notation to use when printing discrete items of content.int
hashCode()
boolean
isEmpty()
Indicates whether this condition is empty, i.e.java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.microsphere.spring.web.rule.WebRequestRule
matches
-
-
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
Indicates whether this condition is empty, i.e. whether it contains any discrete items.- Returns:
true
if empty;false
otherwise
-
getContent
protected abstract java.util.Collection<T> 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 java.lang.String getToStringInfix()
The notation to use when printing discrete items of content.For example
" || "
for URL patterns or" && "
for param expressions.
-
equals
public boolean equals(@Nullable java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-