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

# Class ASTMulNode

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

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

public class ASTMulNode extends ASTMathNode
Handles multiplication
Please look at the Parser.jjt file which is what controls the generation of this class.

Version:
  $Id$
Author:
  Will Glass-Husain, Peter Romianowski, Jason van Zyl, Geir Magnusson Jr.

## Field Summary

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

`strictMode`

### 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
`ASTMulNode(int id)`
`ASTMulNode(Parser p, int id)`

## Method Summary

Modifier and Type
Method
Description
`String`
`getLiteralOperator()`
get the string representing the mathematical operator
`Object`
`init(InternalContextAdapter context, Object data)`
`Number`
`perform(Number left, Number right, InternalContextAdapter context)`
Performs the math operation represented by this node.

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

`handleSpecial, jjtAccept, value`

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

`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, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, render, saveTokenImages, setFirstToken, setInfo, setInvalid, toString, toString`

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

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

## Constructor Details

### ASTMulNode

public ASTMulNode(int id)

Parameters:
  `id` -

### ASTMulNode

public ASTMulNode(Parser p, int id)

Parameters:
  `p` -
  `id` -

## Method Details

### perform

public Number perform(Number left, Number right, InternalContextAdapter context)
Description copied from class: `ASTMathNode`
Performs the math operation represented by this node.

Specified by:
  `perform` in class `ASTMathNode`
Parameters:
  `left` -
  `right` -
  `context` -
Returns:
  computed value
See Also:
  - `ASTAddNode.perform(Number, Number, InternalContextAdapter)`

### init

public Object init(InternalContextAdapter context, Object data) throws TemplateInitException
Description copied from class: `ASTMathNode`

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

### getLiteralOperator

public String getLiteralOperator()
Description copied from class: `ASTBinaryOperator`
get the string representing the mathematical operator

Specified by:
  `getLiteralOperator` in class `ASTBinaryOperator`
Returns:
  operator string