|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
This interface specifies the methods needed to create all of the expressions supported by the message selector. It exists solely to decouple the expression evaluation classes from the parser.
Expression,
SelectorTokenTypes,
SelectorTreeParser| Method Summary | |
Expression |
between(Expression num1,
Expression num2,
Expression num3)
Create a 'between' expression that returns the result of: num1 >= num2 and num1 <= num3
when evaluated |
Expression |
binaryOperator(int operator,
Expression left,
Expression right)
Create a binary operator expression |
Expression |
identifier(java.lang.String name)
Create an identifier expression |
Expression |
in(Expression identifier,
java.util.HashSet set)
Create an 'in' expression |
Expression |
isNull(Expression identifier)
Create an 'is null' expression |
Expression |
like(Expression identifier,
java.lang.String pattern,
java.lang.String escape)
Create a 'like' expression |
Expression |
literal(int type,
java.lang.String text)
Create a literal expression |
Expression |
unaryOperator(int operator,
Expression operand)
Create an unary operator expression |
| Method Detail |
public Expression binaryOperator(int operator,
Expression left,
Expression right)
throws SelectorException
operator - the operator token type from SelectorTokenTypesleft - the left-hand side of the binary expressionright - the right-hand side of the binary expressionSelectorException - if the operator is not a valid binary operator
public Expression unaryOperator(int operator,
Expression operand)
throws SelectorException
operator - the operator token type from SelectorTokenTypesoperand - the expression to apply the operator toSelectorException - if the operator is not a valid unary operator
public Expression identifier(java.lang.String name)
throws SelectorException
name - the name of the identifierSelectorException - is name is not a valid identifier
public Expression isNull(Expression identifier)
throws SelectorException
identifier - the identifer expression to apply the 'is null' testSelectorException - for any error
public Expression like(Expression identifier,
java.lang.String pattern,
java.lang.String escape)
throws SelectorException
identifier - the identifer to apply the 'like' test topattern - the search patternescape - the escape character. This may be nullSelectorException - if the pattern or escape is invalid
public Expression between(Expression num1,
Expression num2,
Expression num3)
throws SelectorException
num1 >= num2 and num1 <= num3
when evaluatednum1 - an arithmethic expressionnum2 - an arithmethic expressionnum3 - an arithmethic expressionSelectorException - for any error
public Expression in(Expression identifier,
java.util.HashSet set)
throws SelectorException
identifier - string identifer to apply the 'in' test toset - the set of string values to compare againstSelectorException - for any error
public Expression literal(int type,
java.lang.String text)
throws SelectorException
type - the operator token type from SelectorTokenTypestext - the literal textSelectorException - if type is not a valid literal type
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||