public interface Expression
Expression
or predicate that checks a value or property
.Expressions
Modifier and Type | Method and Description |
---|---|
default Expression |
and(Expression... terms) |
Expression |
combine(Conjunction conjunction,
Collection<Expression> terms) |
default Expression |
combine(Conjunction conjunction,
Expression... terms) |
boolean |
evaluate() |
void |
format(ExpressionFormatter formatter,
Bracketing bracketing) |
boolean |
isConstant() |
Expression |
negate() |
default Expression |
or(Expression... terms) |
boolean evaluate()
true
if the expression is fulfilled, false
otherwise.Predicate.test(Object)
Expression negate()
Expression
.Expression combine(Conjunction conjunction, Collection<Expression> terms)
conjunction
- the Conjunction
.terms
- the Collection
of the Expression
s to combine with this one.Expression
combining this Expression
with the given Expression
s using the
given Conjunction
.default Expression combine(Conjunction conjunction, Expression... terms)
conjunction
- the Conjunction
.terms
- the array of the Expression
s to combine with this one.Expression
combining this Expression
with the given Expression
s using the
given Conjunction
.default Expression or(Expression... terms)
terms
- the array of the Expression
s to combine with this one.Expression
combining this Expression
with the given Expression
s using a
logical OR
.default Expression and(Expression... terms)
terms
- the array of the Expression
s to combine with this one.Expression
combining this Expression
with the given Expression
s using a
logical AND
.boolean isConstant()
true
if this is a constant
expression
that evaluates
to a fixed result, false
otherwise.void format(ExpressionFormatter formatter, Bracketing bracketing)
formatter
- the ExpressionFormatter
where to append
this Expression
.bracketing
- the Bracketing
.resolveNegativeConjunctions
- true
if negative
Conjunction
s
should be resolved via negation (e.g. !(a OR b)
instead of a NOR b
), false
otherwise.Copyright © 2001–2016 mmm-Team. All rights reserved.