|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jabb.util.exp.BooleanExpression
public class BooleanExpression
Logical expression that results in true or false.
产生true或false结果的逻辑表达式。
| Field Summary | |
|---|---|
protected List<BooleanExpression> |
children
|
static BooleanExpression |
FALSE
|
protected static int |
OPERAND
|
protected static int |
OPERATOR_AND
|
protected static int |
OPERATOR_NOT
|
protected static int |
OPERATOR_OR
|
protected int |
operatorType
|
static BooleanExpression |
TRUE
|
| Constructor Summary | |
|---|---|
protected |
BooleanExpression(int operatorType)
创建一个实例 |
| Method Summary | |
|---|---|
void |
addOperand(BooleanExpression... operands)
给表达式增加运算数 |
void |
addOperand(BooleanExpression operand)
给表达式增加运算数 |
void |
addOperand(Collection<? extends BooleanExpression> operands)
给表达式增加运算数 |
static BooleanExpression |
AND(BooleanExpression... operands)
创建用AND连接的表达式 |
static BooleanExpression |
AND(Collection<? extends BooleanExpression> operands)
创建用AND连接的表达式 |
boolean |
evaluate()
用null作为context获得表达式的结果。子类不必重载这个方法。 |
boolean |
evaluate(Object context)
获得表达式的结果。子类可以重载这个方法。 |
static BooleanExpression |
HAS(Object obj)
|
static BooleanExpression |
NOT(BooleanExpression operand)
创建用NOT修饰的表达式 |
static BooleanExpression |
OR(BooleanExpression... operands)
创建用OR连接的表达式 |
static BooleanExpression |
OR(Collection<? extends BooleanExpression> operands)
创建用OR连接的表达式 |
String |
toString()
转成字符串表示。子类可以重载这个方法。 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final int OPERATOR_AND
protected static final int OPERATOR_OR
protected static final int OPERATOR_NOT
protected static final int OPERAND
public static final BooleanExpression TRUE
public static final BooleanExpression FALSE
protected int operatorType
protected List<BooleanExpression> children
| Constructor Detail |
|---|
protected BooleanExpression(int operatorType)
operatorType - | Method Detail |
|---|
public static BooleanExpression AND(BooleanExpression... operands)
operands -
public static BooleanExpression AND(Collection<? extends BooleanExpression> operands)
operands -
public static BooleanExpression OR(BooleanExpression... operands)
operands -
public static BooleanExpression OR(Collection<? extends BooleanExpression> operands)
operands -
public static BooleanExpression NOT(BooleanExpression operand)
operand -
public static BooleanExpression HAS(Object obj)
public void addOperand(BooleanExpression operand)
operand - public void addOperand(BooleanExpression... operands)
operands - public void addOperand(Collection<? extends BooleanExpression> operands)
operands - public boolean evaluate(Object context)
context -
public boolean evaluate()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||