public class SimpleTest extends Object
ValueStack,
ComplexException,
Parser| Modifier and Type | Field and Description |
|---|---|
protected static int |
AND |
protected static char |
AND_CHAR |
protected static int |
CHECK_NULL |
protected int |
condition |
protected static int |
EQUAL |
protected static char |
EQUAL_CHAR |
protected String |
exp1 |
protected String |
exp2 |
protected static int |
GREATER |
protected static char |
GREATER_CHAR |
protected static int |
GREATER_EQUAL |
protected static int |
LESS |
protected static char |
LESS_CHAR |
protected static int |
LESS_EQUAL |
protected boolean |
neg1 |
protected boolean |
neg2 |
protected SimpleTest |
nextTest |
protected static int |
NONE |
protected static char |
NOT_CHAR |
protected static int |
NOT_EQUAL |
protected int |
operator |
protected static int |
OR |
protected static char |
OR_CHAR |
protected Query |
q1 |
protected Query |
q2 |
protected static char |
QUOTE_CHAR |
protected int |
sameVal1 |
protected int |
sameVal2 |
protected Object |
value1 |
protected Object |
value2 |
| Constructor and Description |
|---|
SimpleTest() |
SimpleTest(SimpleTest prevTest,
String exp)
Create a SimpleTest for the expression exp, and make use of the values found in the previously evaluated
expression prevText if possible
|
SimpleTest(String exp) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
checkOperator(String str)
Look through the expression to find any operators like && or ||, <, > etc.
|
protected Object |
getConstant(String exp)
This method checks if the expression is a constant value.
|
static SimpleTest |
getSimpleTest(String expression)
Get a SimpleTest object for the expression.
|
protected boolean |
resolve(int comp,
int condition)
determine true or false by comparing the comparison result with the operator.
|
boolean |
test(ValueStack stack) |
protected boolean |
test(ValueStack stack,
Object prevVal1,
Object prevVal2)
The values in prevVal1 and prevVal2 will always be sent in.
|
protected static final int NONE
protected static final int AND
protected static final int OR
protected static final char AND_CHAR
protected static final char OR_CHAR
protected static final char QUOTE_CHAR
protected static final char EQUAL_CHAR
protected static final char NOT_CHAR
protected static final char GREATER_CHAR
protected static final char LESS_CHAR
protected static final int CHECK_NULL
protected static final int EQUAL
protected static final int NOT_EQUAL
protected static final int GREATER
protected static final int GREATER_EQUAL
protected static final int LESS
protected static final int LESS_EQUAL
protected int condition
protected boolean neg1
protected boolean neg2
protected Query q1
protected Query q2
protected String exp1
protected String exp2
protected Object value1
protected Object value2
protected SimpleTest nextTest
protected int operator
protected int sameVal1
protected int sameVal2
public SimpleTest()
public SimpleTest(SimpleTest prevTest, String exp) throws ComplexException
ComplexExceptionpublic SimpleTest(String exp) throws ComplexException
ComplexExceptionpublic static SimpleTest getSimpleTest(String expression)
protected int checkOperator(String str) throws ComplexException
ComplexExceptionprotected Object getConstant(String exp)
public boolean test(ValueStack stack)
protected boolean test(ValueStack stack, Object prevVal1, Object prevVal2)
protected boolean resolve(int comp,
int condition)
comp - the comparison resultcondition - the conditionCopyright © 2013 Atlassian. All Rights Reserved.