public class ArithmeticExpression extends BinaryExpression
| Modifier and Type | Field and Description |
|---|---|
static int |
ADD
Indicates an addition operation.
|
static int |
DIV
Indicates a division operation.
|
static int |
MOD
Indicates a modulo operation.
|
static int |
MUL
Indicates a multiplication operation.
|
static int |
POW
Indicates an exponentiation (pow) operation.
|
static int |
SUB
Indicates a subtraction operation.
|
m_left, m_op, m_right| Constructor and Description |
|---|
ArithmeticExpression(int operation,
Expression left,
Expression right)
Create a new ArithmeticExpression.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
get(Tuple t)
By default, throws an UnsupportedOperationException.
|
double |
getDouble(Tuple t)
By default, throws an UnsupportedOperationException.
|
float |
getFloat(Tuple t)
By default, throws an UnsupportedOperationException.
|
int |
getInt(Tuple t)
By default, throws an UnsupportedOperationException.
|
long |
getLong(Tuple t)
By default, throws an UnsupportedOperationException.
|
java.lang.Class |
getType(Schema s)
Returns the type that this expression evaluates to when tuples
with the given Schema are provided as input.
|
java.lang.String |
toString() |
addChildListeners, getLeftExpression, getOperation, getRightExpression, removeChildListeners, setLeftExpression, setRightExpression, visitaddExpressionListener, expressionChanged, fireExpressionChange, getBoolean, hasListeners, removeExpressionListenerpublic static final int ADD
public static final int SUB
public static final int MUL
public static final int DIV
public static final int POW
public static final int MOD
public ArithmeticExpression(int operation,
Expression left,
Expression right)
operation - the operation to performleft - the left sub-expressionright - the right sub-expressionpublic java.lang.Class getType(Schema s)
ExpressionExpression.getType(prefuse.data.Schema)public java.lang.Object get(Tuple t)
AbstractExpressionget in interface Expressionget in class AbstractExpressiont - the input TupleExpression.get(prefuse.data.Tuple)public int getInt(Tuple t)
AbstractExpressiongetInt in interface ExpressiongetInt in class AbstractExpressiont - the input TupleExpression.getInt(prefuse.data.Tuple)public long getLong(Tuple t)
AbstractExpressiongetLong in interface ExpressiongetLong in class AbstractExpressiont - the input TupleExpression.getLong(prefuse.data.Tuple)public float getFloat(Tuple t)
AbstractExpressiongetFloat in interface ExpressiongetFloat in class AbstractExpressiont - the input TupleExpression.getFloat(prefuse.data.Tuple)public double getDouble(Tuple t)
AbstractExpressiongetDouble in interface ExpressiongetDouble in class AbstractExpressiont - the input TupleExpression.getDouble(prefuse.data.Tuple)public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()