Class ArithmeticExpression
- java.lang.Object
-
- com.inductiveautomation.ignition.common.expressions.AbstractExpression
-
- com.inductiveautomation.ignition.common.expressions.ArithmeticExpression
-
- All Implemented Interfaces:
Expression
public class ArithmeticExpression extends AbstractExpression
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classArithmeticExpression.StringTypeAffinityDetermines how the operation should behave when strings are involved.
-
Field Summary
Fields Modifier and Type Field Description static intDIVIDEstatic intMINUSstatic intMODstatic intMULTstatic intPLUSstatic intPOW-
Fields inherited from class com.inductiveautomation.ignition.common.expressions.AbstractExpression
children, context, updateListener
-
-
Constructor Summary
Constructors Constructor Description ArithmeticExpression()ArithmeticExpression(Expression e1, Expression e2, int opType)ArithmeticExpression(Expression e1, Expression e2, int opType, boolean forceNumeric)ArithmeticExpression(Expression e1, Expression e2, int opType, ArithmeticExpression.StringTypeAffinity affinity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleaneitherString(QualifiedValue v1, QualifiedValue v2)QualifiedValueexecute()Compute and return the value of this expressionjava.lang.StringgetOpName()Return a human-readable name for the operation that this expression performsintgetOpType()java.lang.Class<?>getType()Return the type that this expression will returnbooleanisConcat()voidsetConcat(boolean isConcat)voidsetOpType(int i)-
Methods inherited from class com.inductiveautomation.ignition.common.expressions.AbstractExpression
connect, disconnect, getChildren, setChildren, shutdown, startup
-
-
-
-
Field Detail
-
PLUS
public static final int PLUS
- See Also:
- Constant Field Values
-
MINUS
public static final int MINUS
- See Also:
- Constant Field Values
-
MULT
public static final int MULT
- See Also:
- Constant Field Values
-
DIVIDE
public static final int DIVIDE
- See Also:
- Constant Field Values
-
MOD
public static final int MOD
- See Also:
- Constant Field Values
-
POW
public static final int POW
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ArithmeticExpression
public ArithmeticExpression(Expression e1, Expression e2, int opType)
-
ArithmeticExpression
public ArithmeticExpression(Expression e1, Expression e2, int opType, boolean forceNumeric)
-
ArithmeticExpression
public ArithmeticExpression(Expression e1, Expression e2, int opType, ArithmeticExpression.StringTypeAffinity affinity)
-
ArithmeticExpression
public ArithmeticExpression()
-
-
Method Detail
-
eitherString
protected boolean eitherString(QualifiedValue v1, QualifiedValue v2)
-
execute
@Nonnull public QualifiedValue execute() throws ExpressionException
Description copied from interface:ExpressionCompute and return the value of this expression- Throws:
ExpressionException
-
getType
public java.lang.Class<?> getType()
Description copied from interface:ExpressionReturn the type that this expression will return
-
getOpName
public java.lang.String getOpName()
Description copied from interface:ExpressionReturn a human-readable name for the operation that this expression performs
-
getOpType
public int getOpType()
-
setOpType
public void setOpType(int i)
-
isConcat
public boolean isConcat()
-
setConcat
public void setConcat(boolean isConcat)
-
-