public class ReferenceTransposer extends ExpressionBuilder
Constructor and Description |
---|
ReferenceTransposer(int columns,
int rows)
Creates a new reference fetcher.
|
Modifier and Type | Method and Description |
---|---|
Expression |
getExpression(Expression expression)
Returns a transposed copy of the given expression.
|
Expression |
visitReference(Reference reference)
Transposes the reference.
|
visitBinaryOperation, visitFunctionCall, visitLiteral, visitUnaryOperation
public ReferenceTransposer(int columns, int rows)
columns
- the number of columns to transpose formulaerows
- the number of rows to transpose formulaepublic Expression getExpression(Expression expression)
getExpression
in class ExpressionBuilder
expression
- the expression to rebuildpublic Expression visitReference(Reference reference)
visitReference
in interface ExpressionVisitor
visitReference
in class ExpressionBuilder
reference
- the reference to visit