Package org.apache.velocity.runtime.parser.node

# Class ASTBinaryOperator

java.lang.Object
org.apache.velocity.runtime.parser.node.SimpleNode
org.apache.velocity.runtime.parser.node.ASTBinaryOperator

All Implemented Interfaces:
  `Cloneable`, `Node`, `Renderable`

Direct Known Subclasses:
  `ASTComparisonNode`, `ASTLogicalOperator`, `ASTMathNode`

public abstract class ASTBinaryOperator extends SimpleNode

## Field Summary

### Fields inherited from class org.apache.velocity.runtime.parser.node.SimpleNode

`children, column, first, firstImage, id, info, invalid, last, lastImage, line, literal, log, parent, parser, rsvc, state, template`

## Constructor Summary

Constructors
Constructor
Description
`ASTBinaryOperator(int id)`
`ASTBinaryOperator(Parser p, int id)`

## Method Summary

Modifier and Type
Method
Description
`abstract String`
`getLiteralOperator()`
get the string representing the mathematical operator
`Object`
`init(InternalContextAdapter context, Object data)`
`String`
`literal()`

### Methods inherited from class org.apache.velocity.runtime.parser.node.SimpleNode

`childrenAccept, cleanupParserAndTokens, clone, clone, dump, dump, dump, evaluate, execute, getColumn, getFirstToken, getFirstTokenImage, getInfo, getLastToken, getLastTokenImage, getLine, getLocation, getParser, getRuntimeServices, getTemplate, getTemplateName, getType, isInvalid, jjtAccept, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, render, saveTokenImages, setFirstToken, setInfo, setInvalid, toString, toString, value`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### ASTBinaryOperator

public ASTBinaryOperator(int id)

### ASTBinaryOperator

public ASTBinaryOperator(Parser p, int id)

## Method Details

### init

public Object init(InternalContextAdapter context, Object data) throws TemplateInitException

Specified by:
  `init` in interface `Node`
Overrides:
  `init` in class `SimpleNode`
Parameters:
  `context` -
  `data` -
Returns:
  The init result.
Throws:
  `TemplateInitException`
See Also:
  - `Node.init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object)`

### getLiteralOperator

public abstract String getLiteralOperator()
get the string representing the mathematical operator

Returns:
  operator string

### literal

public String literal()

Specified by:
  `literal` in interface `Node`
Overrides:
  `literal` in class `SimpleNode`
Returns:
  A literal.
See Also:
  - `Node.literal()`