spring-framework / org.springframework.web.servlet.mvc.condition / AbstractRequestCondition

AbstractRequestCondition

abstract class AbstractRequestCondition<T : AbstractRequestCondition<T>> : RequestCondition<T>

A base class for RequestCondition types providing implementations of #equals(Object), #hashCode(), and #toString().

Author
Rossen Stoyanchev

Since
3.1

Constructors

<init>

AbstractRequestCondition()

A base class for RequestCondition types providing implementations of #equals(Object), #hashCode(), and #toString().

Functions

equals

open fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

isEmpty

open fun isEmpty(): Boolean

Indicates whether this condition is empty, i.e. whether or not it contains any discrete items.

toString

open fun toString(): String

Inheritors

CompositeRequestCondition

open class CompositeRequestCondition : AbstractRequestCondition<CompositeRequestCondition>

Implements the RequestCondition contract by delegating to multiple RequestCondition types and using a logical conjunction (' && ') to ensure all conditions match a given request.

When CompositeRequestCondition instances are combined or compared they are expected to (a) contain the same number of conditions and (b) that conditions in the respective index are of the same type. It is acceptable to provide null conditions or no conditions at all to the constructor.