Class PathRule
java.lang.Object
uk.org.webcompere.modelassert.json.condition.tree.PathRule
Dictates a
TreeRule that applies at a given path match and any operand for that rule-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
PathRule
Constructed with a stateless tree rule for everywhere- Parameters:
rule- the rule
-
PathRule
Construct to apply a rule to a path- Parameters:
pathMatch- the path the rule applies torule- the rule to apply - no operand
-
PathRule
Construct to apply a condition rule to a path- Parameters:
pathMatch- the path the rule applies toruleCondition- the condition to apply
-
-
Method Details
-
matches
Does this rule apply to this location- Parameters:
location- the location to test- Returns:
truewhen the rule applies
-
getRule
Get the rule type- Returns:
- the type of rule
-
getRuleCondition
Get any condition associated with the rule- Returns:
- condition
-
toString
-