public class ConjunctionExpression extends Object implements Expression
| Modifier and Type | Field and Description |
|---|---|
private Conjunction |
conjunction |
private List<Expression> |
terms |
| Modifier | Constructor and Description |
|---|---|
private |
ConjunctionExpression(Conjunction conjunction,
List<Expression> terms)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Expression |
combine(Conjunction conj,
Collection<Expression> expressions) |
boolean |
evaluate() |
void |
format(ExpressionFormatter formatter,
Bracketing bracketing) |
Conjunction |
getConjunction() |
List<Expression> |
getTerms() |
boolean |
isConstant() |
Expression |
negate() |
static Expression |
valueOf(Conjunction conjunction,
Collection<Expression> expressions) |
static Expression |
valueOf(Conjunction conjunction,
Expression... expressions) |
static Expression |
valueOf(Expression expression,
Conjunction conjunction,
Collection<Expression> expressions) |
private static Expression |
valueOf(List<Expression> children,
Conjunction conjunction,
Collection<Expression> expressions) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitand, combine, orprivate final Conjunction conjunction
private final List<Expression> terms
private ConjunctionExpression(Conjunction conjunction, List<Expression> terms)
conjunction - - see getConjunction().terms - the terms to combine.public Conjunction getConjunction()
Conjunction.public List<Expression> getTerms()
unmodifiable List of the Expression-Terms to
combine with the conjunction.public Expression negate()
negate in interface ExpressionExpression.public boolean evaluate()
evaluate in interface Expressiontrue if the expression is fulfilled, false otherwise.Predicate.test(Object)public Expression combine(Conjunction conj, Collection<Expression> expressions)
combine in interface Expressionconj - 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 Expression valueOf(Conjunction conjunction, Expression... expressions)
conjunction - the conjunction.expressions - the Expression terms.Expression. May be reduced and therefore does not have to be an instance of
ConjunctionExpression.public static Expression valueOf(Conjunction conjunction, Collection<Expression> expressions)
conjunction - the conjunction.expressions - the Expression terms.Expression. May be reduced and therefore does not have to be an instance of
ConjunctionExpression.public static Expression valueOf(Expression expression, Conjunction conjunction, Collection<Expression> expressions)
expression - the start expression to combine with the given
Expression-Collection.conjunction - the conjunction.expressions - the Expression terms.Expression. May be reduced and therefore does not have to be an instance of
ConjunctionExpression.private static Expression valueOf(List<Expression> children, Conjunction conjunction, Collection<Expression> expressions)
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.