Package ise.antelope.tasks
Class Op
java.lang.Object
ise.antelope.tasks.Op
Represents a mathematical operation.
Copyright 2003, Dale Anson, all rights reserved
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addConfiguredNum
(Num num) Add a number to this operation.void
addConfiguredOp
(Op op) Add a nested operation.Perform this operation.void
Sets the datatype of this calculation.void
Set the operation.void
setStrict
(boolean b) Use the StrictMath library.
-
Constructor Details
-
Op
public Op() -
Op
-
Op
-
-
Method Details
-
setOp
Set the operation. -
addConfiguredNum
Add a number to this operation. An operation can hold any number of numbers to support formulas like 5 + 4 + 3 + 2 + 1.- Parameters:
num
- a number to use in this operation
-
setDatatype
Sets the datatype of this calculation. Allowed values are "int", "long", "float", or "double". -
addConfiguredOp
Add a nested operation.- Parameters:
op
- the operation to add.
-
setStrict
public void setStrict(boolean b) Use the StrictMath library. -
calculate
Perform this operation.- Returns:
- the value resulting from the calculation as a Num.
-