Class CompositeRequestCondition

java.lang.Object
org.springframework.web.servlet.mvc.condition.AbstractRequestCondition<CompositeRequestCondition>
org.springframework.web.servlet.mvc.condition.CompositeRequestCondition
All Implemented Interfaces:
RequestCondition<CompositeRequestCondition>

public class CompositeRequestCondition extends 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.

Since:
3.2
Author:
Rossen Stoyanchev
  • Constructor Details

    • CompositeRequestCondition

      public CompositeRequestCondition(RequestCondition<?>... requestConditions)
      Create an instance with 0 or more RequestCondition types. It is important to create CompositeRequestCondition instances with the same number of conditions so they may be compared and combined. It is acceptable to provide null conditions.
  • Method Details