Class LogicExpression
- java.lang.Object
-
- org.apache.activemq.artemis.selector.filter.LogicExpression
-
- All Implemented Interfaces:
BooleanExpression,Expression
public abstract class LogicExpression extends java.lang.Object implements BooleanExpression
A sequence of expressions, to be combined with OR or AND conjunctions.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.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 java.lang.Objectevaluate(Filterable message)abstract java.lang.StringgetExpressionSymbol()Returns the symbol that represents this binary expression.BooleanExpressiongetLeft()BooleanExpressiongetRight()abstract booleanmatches(Filterable message)java.lang.StringtoString()
-
-
-
Field Detail
-
expressions
protected final java.util.List<BooleanExpression> expressions
-
-
Method Detail
-
addExpression
protected void addExpression(BooleanExpression expression)
-
getLeft
public BooleanExpression getLeft()
-
getRight
public BooleanExpression getRight()
-
getExpressionSymbol
public abstract java.lang.String getExpressionSymbol()
Returns the symbol that represents this binary expression. For example, addition is represented by "+"- Returns:
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
createOR
public static BooleanExpression createOR(BooleanExpression lvalue, BooleanExpression rvalue)
-
createAND
public static BooleanExpression createAND(BooleanExpression lvalue, BooleanExpression rvalue)
-
evaluate
public abstract java.lang.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
-
-