Class StandardExpressionContext
- java.lang.Object
-
- com.broadleafcommerce.rulesengine.expression.context.StandardExpressionContext
-
- All Implemented Interfaces:
ExpressionContext
,Serializable
- Direct Known Subclasses:
StandardSpelExpressionContext
public class StandardExpressionContext extends Object implements ExpressionContext
Standard implementation ofExpressionContext
for use when evaluating expressions. Fields are immutable.- Author:
- Nathan Moore (nathanmoore).
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static ExpressionContext
EMPTY_EXPRESSION_CONTEXT
-
Constructor Summary
Constructors Constructor Description StandardExpressionContext()
StandardExpressionContext(boolean matchAny, int limit, Map<String,Object> variables)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(Object other)
boolean
equals(Object o)
int
getLimit()
'Limit' is intended to be used to limit the number of results to return when matching a group of rules against a group of objects.Map<String,Object>
getVariables()
'Variables' is intended to be used to store named variables that are to be injected into an expression or group of expressions, replacing#variableName
references.int
hashCode()
boolean
isMatchAnyRule()
'Match any' is intended to be used to determine whether all of a group of rules must match against an object or just 1.String
toString()
-
-
-
Field Detail
-
EMPTY_EXPRESSION_CONTEXT
public static final ExpressionContext EMPTY_EXPRESSION_CONTEXT
-
-
Method Detail
-
isMatchAnyRule
public boolean isMatchAnyRule()
Description copied from interface:ExpressionContext
'Match any' is intended to be used to determine whether all of a group of rules must match against an object or just 1.- Specified by:
isMatchAnyRule
in interfaceExpressionContext
- Returns:
- whether all rules must match or any
-
getLimit
public int getLimit()
Description copied from interface:ExpressionContext
'Limit' is intended to be used to limit the number of results to return when matching a group of rules against a group of objects.- Specified by:
getLimit
in interfaceExpressionContext
- Returns:
- number of matching results to return
-
getVariables
public Map<String,Object> getVariables()
Description copied from interface:ExpressionContext
'Variables' is intended to be used to store named variables that are to be injected into an expression or group of expressions, replacing#variableName
references.- Specified by:
getVariables
in interfaceExpressionContext
- Returns:
- variables to inject into an expression or group of expressions
-
canEqual
protected boolean canEqual(Object other)
-
-