Class BinaryExpression<T>
java.lang.Object
io.pebbletemplates.pebble.node.expression.BinaryExpression<T>
- All Implemented Interfaces:
Expression<T>, Node
- Direct Known Subclasses:
AddExpression, AndExpression, ConcatenateExpression, ContainsExpression, DivideExpression, EqualsExpression, FilterExpression, GreaterThanEqualsExpression, GreaterThanExpression, LessThanEqualsExpression, LessThanExpression, ModulusExpression, MultiplyExpression, NotEqualsExpression, OrExpression, PositiveTestExpression, RangeExpression, SubtractExpression
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBinaryExpression(Expression<?> left, Expression<?> right) Sets the left and right expressions. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(NodeVisitor visitor) Expression<?> intReturns the line number on which the expression is defined on.Expression<?> voidsetLeft(Expression<?> left) voidsetLineNumber(int lineNumber) Sets the line number on which the expression is defined on.voidsetRight(Expression<?> right) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Expression
evaluate
-
Field Details
-
lineNumber
private int lineNumber -
leftExpression
-
rightExpression
-
-
Constructor Details
-
BinaryExpression
public BinaryExpression() -
BinaryExpression
Sets the left and right expressions. This expression is assumed to be defined on the same line as the left expression.
-
-
Method Details
-
setLeft
-
setRight
-
getLeftExpression
-
getRightExpression
-
accept
-
setLineNumber
public void setLineNumber(int lineNumber) Sets the line number on which the expression is defined on.- Parameters:
lineNumber- the line number on which the expression is defined on.
-
getLineNumber
public int getLineNumber()Description copied from interface:ExpressionReturns the line number on which the expression is defined on.- Specified by:
getLineNumberin interfaceExpression<T>- Returns:
- the line number on which the expression is defined on.
-