org.ofbiz.minilang.method.otherops
Class Calculate

java.lang.Object
  extended by org.ofbiz.minilang.method.MethodOperation
      extended by org.ofbiz.minilang.method.otherops.Calculate

public class Calculate
extends MethodOperation

Calculates a result based on nested calcops.


Nested Class Summary
protected static class Calculate.CalcOp
           
static class Calculate.CalculateFactory
           
protected static class Calculate.NumberOp
           
protected static interface Calculate.SubCalc
           
 
Nested classes/interfaces inherited from class org.ofbiz.minilang.method.MethodOperation
MethodOperation.DeprecatedOperation, MethodOperation.Factory<M extends MethodOperation>
 
Field Summary
static java.lang.String module
           
static int TYPE_BIG_DECIMAL
           
static int TYPE_DOUBLE
           
static int TYPE_FLOAT
           
static int TYPE_INTEGER
           
static int TYPE_LONG
           
static int TYPE_STRING
           
static java.math.BigDecimal ZERO
           
 
Fields inherited from class org.ofbiz.minilang.method.MethodOperation
simpleMethod
 
Constructor Summary
Calculate(org.w3c.dom.Element element, SimpleMethod simpleMethod)
           
 
Method Summary
 boolean exec(MethodContext methodContext)
          Execute the operation; if false is returned then no further operations will be executed
 java.lang.String expandedString(MethodContext methodContext)
          Create an expanded string representation of the operation, is for the current context
 java.lang.String rawString()
          Create a raw string representation of the operation, would be similar to original XML
 
Methods inherited from class org.ofbiz.minilang.method.MethodOperation
getSimpleMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

module

public static final java.lang.String module

ZERO

public static final java.math.BigDecimal ZERO

TYPE_DOUBLE

public static final int TYPE_DOUBLE
See Also:
Constant Field Values

TYPE_FLOAT

public static final int TYPE_FLOAT
See Also:
Constant Field Values

TYPE_LONG

public static final int TYPE_LONG
See Also:
Constant Field Values

TYPE_INTEGER

public static final int TYPE_INTEGER
See Also:
Constant Field Values

TYPE_STRING

public static final int TYPE_STRING
See Also:
Constant Field Values

TYPE_BIG_DECIMAL

public static final int TYPE_BIG_DECIMAL
See Also:
Constant Field Values
Constructor Detail

Calculate

public Calculate(org.w3c.dom.Element element,
                 SimpleMethod simpleMethod)
Method Detail

exec

public boolean exec(MethodContext methodContext)
Description copied from class: MethodOperation
Execute the operation; if false is returned then no further operations will be executed

Specified by:
exec in class MethodOperation

rawString

public java.lang.String rawString()
Description copied from class: MethodOperation
Create a raw string representation of the operation, would be similar to original XML

Specified by:
rawString in class MethodOperation

expandedString

public java.lang.String expandedString(MethodContext methodContext)
Description copied from class: MethodOperation
Create an expanded string representation of the operation, is for the current context

Specified by:
expandedString in class MethodOperation