Class LogicExpression
- java.lang.Object
-
- org.apache.activemq.artemis.selector.filter.LogicExpression
-
- All Implemented Interfaces:
BooleanExpression,Expression
public abstract class LogicExpression extends Object implements BooleanExpression
A sequence of expressions, to be combined with OR or AND conjunctions.
-
-
Field Summary
Fields Modifier and Type Field Description protected List<BooleanExpression>expressions
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddExpression(BooleanExpression expression)static BooleanExpressioncreateAND(BooleanExpression lvalue, BooleanExpression rvalue)static BooleanExpressioncreateOR(BooleanExpression lvalue, BooleanExpression rvalue)abstract Objectevaluate(Filterable message)abstract StringgetExpressionSymbol()Returns the symbol that represents this binary expression.BooleanExpressiongetLeft()BooleanExpressiongetRight()abstract booleanmatches(Filterable message)StringtoString()
-
-
-
Field Detail
-
expressions
protected final List<BooleanExpression> expressions
-
-
Method Detail
-
addExpression
protected void addExpression(BooleanExpression expression)
-
getLeft
public BooleanExpression getLeft()
-
getRight
public BooleanExpression getRight()
-
getExpressionSymbol
public abstract String getExpressionSymbol()
Returns the symbol that represents this binary expression. For example, addition is represented by "+"- Returns:
-
createOR
public static BooleanExpression createOR(BooleanExpression lvalue, BooleanExpression rvalue)
-
createAND
public static BooleanExpression createAND(BooleanExpression lvalue, BooleanExpression rvalue)
-
evaluate
public abstract Object evaluate(Filterable message) throws FilterException
- Specified by:
evaluatein interfaceExpression- Returns:
- the value of this expression
- Throws:
FilterException
-
matches
public abstract boolean matches(Filterable message) throws FilterException
- Specified by:
matchesin interfaceBooleanExpression- Returns:
- true if the expression evaluates to Boolean.TRUE.
- Throws:
FilterException
-
-