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
public abstract class BinaryExpression<T> extends java.lang.Object implements Expression<T>
-
-
Field Summary
Fields Modifier and Type Field Description private Expression<?>leftExpressionprivate intlineNumberprivate Expression<?>rightExpression
-
Constructor Summary
Constructors Constructor Description BinaryExpression()BinaryExpression(Expression<?> left, Expression<?> right)Sets the left and right expressions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(NodeVisitor visitor)Expression<?>getLeftExpression()intgetLineNumber()Returns the line number on which the expression is defined on.Expression<?>getRightExpression()voidsetLeft(Expression<?> left)voidsetLineNumber(int lineNumber)Sets the line number on which the expression is defined on.voidsetRight(Expression<?> right)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.pebbletemplates.pebble.node.expression.Expression
evaluate
-
-
-
-
Field Detail
-
lineNumber
private int lineNumber
-
leftExpression
private Expression<?> leftExpression
-
rightExpression
private Expression<?> rightExpression
-
-
Constructor Detail
-
BinaryExpression
public BinaryExpression()
-
BinaryExpression
public BinaryExpression(Expression<?> left, Expression<?> right)
Sets the left and right expressions. This expression is assumed to be defined on the same line as the left expression.
-
-
Method Detail
-
setLeft
public void setLeft(Expression<?> left)
-
setRight
public void setRight(Expression<?> right)
-
getLeftExpression
public Expression<?> getLeftExpression()
-
getRightExpression
public Expression<?> getRightExpression()
-
accept
public void accept(NodeVisitor visitor)
-
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.
-
-