|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectprefuse.data.expression.AbstractExpression
prefuse.data.expression.BinaryExpression
prefuse.data.expression.ArithmeticExpression
public class ArithmeticExpression
Expression supporting basic arithmetic: add, subtract, multiply, divide, exponentiate (pow), and modulo (%).
| Field Summary | |
|---|---|
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. |
| Fields inherited from class prefuse.data.expression.BinaryExpression |
|---|
m_left, m_op, m_right |
| Constructor Summary | |
|---|---|
ArithmeticExpression(int operation,
Expression left,
Expression right)
Create a new ArithmeticExpression. |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class prefuse.data.expression.BinaryExpression |
|---|
addChildListeners, getLeftExpression, getOperation, getRightExpression, removeChildListeners, setLeftExpression, setRightExpression, visit |
| Methods inherited from class prefuse.data.expression.AbstractExpression |
|---|
addExpressionListener, expressionChanged, fireExpressionChange, getBoolean, hasListeners, removeExpressionListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public 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
| Constructor Detail |
|---|
public ArithmeticExpression(int operation,
Expression left,
Expression right)
operation - the operation to performleft - the left sub-expressionright - the right sub-expression| Method Detail |
|---|
public java.lang.Class getType(Schema s)
Expression
Expression.getType(prefuse.data.Schema)public java.lang.Object get(Tuple t)
AbstractExpression
get in interface Expressionget in class AbstractExpressiont - the input Tuple
Expression.get(prefuse.data.Tuple)public int getInt(Tuple t)
AbstractExpression
getInt in interface ExpressiongetInt in class AbstractExpressiont - the input Tuple
Expression.getInt(prefuse.data.Tuple)public long getLong(Tuple t)
AbstractExpression
getLong in interface ExpressiongetLong in class AbstractExpressiont - the input Tuple
Expression.getLong(prefuse.data.Tuple)public float getFloat(Tuple t)
AbstractExpression
getFloat in interface ExpressiongetFloat in class AbstractExpressiont - the input Tuple
Expression.getFloat(prefuse.data.Tuple)public double getDouble(Tuple t)
AbstractExpression
getDouble in interface ExpressiongetDouble in class AbstractExpressiont - the input Tuple
Expression.getDouble(prefuse.data.Tuple)public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||