public class ConstantExpression extends Object implements Expression
Expression that is constant and will always evaluate to a
static (fixed) value.TRUE,
FALSE,
valueOf(boolean)| Modifier and Type | Field and Description |
|---|---|
static ConstantExpression |
FALSE
|
static ConstantExpression |
TRUE
|
| Modifier | Constructor and Description |
|---|---|
private |
ConstantExpression()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Expression |
combine(Conjunction conjunction,
Collection<Expression> expressions) |
boolean |
evaluate() |
void |
format(ExpressionFormatter formatter,
Bracketing bracketing) |
boolean |
isConstant() |
Expression |
negate() |
static ConstantExpression |
valueOf(boolean value) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitand, combine, orpublic static final ConstantExpression TRUE
public static final ConstantExpression FALSE
public boolean evaluate()
evaluate in interface Expressiontrue if the expression is fulfilled, false otherwise.Predicate.test(Object)public Expression negate()
negate in interface ExpressionExpression.public Expression combine(Conjunction conjunction, Collection<Expression> expressions)
combine in interface Expressionconjunction - the Conjunction.expressions - the Collection of the Expressions to combine with this one.Expression combining this Expression with the given Expressions using the
given Conjunction.public boolean isConstant()
isConstant in interface Expressiontrue if this is a constant
expression that evaluates to a fixed result, false otherwise.public static ConstantExpression valueOf(boolean value)
value - the boolean value the requested ConstantExpression should evaluate
to.TRUE if value is true, FALSE otherwise.public void format(ExpressionFormatter formatter, Bracketing bracketing)
format in interface Expressionformatter - the ExpressionFormatter where to append
this Expression.bracketing - the Bracketing.Copyright © 2001–2016 mmm-Team. All rights reserved.