L - the generic type of the left hand.R - the generic type of the right hand.public class SingleExpression<L,R> extends Object implements Expression
Expression for a single operation on given arguments.| Modifier and Type | Field and Description |
|---|---|
private Argument<L> |
arg1 |
private Argument<R> |
arg2 |
private SqlOperator<? super L,? super R> |
operator |
| Modifier | Constructor and Description |
|---|---|
private |
SingleExpression(Argument<L> arg1,
SqlOperator<? super L,? super R> operator,
Argument<R> arg2)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Expression |
combine(Conjunction conjunction,
Collection<Expression> expressions) |
boolean |
evaluate() |
void |
format(ExpressionFormatter formatter,
Bracketing bracketing) |
Argument<L> |
getArg1() |
Argument<R> |
getArg2() |
SqlOperator<? super L,? super R> |
getOperator() |
boolean |
isConstant() |
Expression |
negate() |
static <L,R> Expression |
valueOf(Argument<L> arg1,
SqlOperator<? super L,? super R> operator,
Argument<R> arg2) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitand, combine, orprivate final SqlOperator<? super L,? super R> operator
private SingleExpression(Argument<L> arg1, SqlOperator<? super L,? super R> operator, Argument<R> arg2)
arg1 - - see getArg1().operator - - see getOperator().arg2 - - see getArg2().public Expression negate()
negate in interface ExpressionExpression.public SqlOperator<? super L,? super R> getOperator()
SqlOperator.public boolean evaluate()
evaluate in interface Expressiontrue if the expression is fulfilled, false otherwise.Predicate.test(Object)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 <L,R> Expression valueOf(Argument<L> arg1, SqlOperator<? super L,? super R> operator, Argument<R> arg2)
L - the generic type of the left hand.R - the generic type of the right hand.arg1 - - see getArg1().operator - - see getOperator().arg2 - - see getArg2().Expression for a single operation on given arguments. Will be reduced to
a ConstantExpression if both ConstantArguments are constant and therefore does not have to be an instance of SingleExpression.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.