Follow the links below to browse sample Javadoc for MJ classes and tools, including the MJ Runtime Library.

 

Package: com.arsi.mj.fml.impl  previous next contents

The formula impl package contains internal classes that configure and extend Spring Expression Language (SpEL) to support MJ's formula syntax and features.

Classes and Interfaces
BinaryOperatorOverloader Forces overloading of standard operations for mathematical formulae.
FormulaConversionService Provides formula-specific conversions.
FormulaTypeConverter Allows customization of the expression result handling so that numeric encapsulation does not cause errors.
IFmlBinaryOperation Defines the integration mechanism for binary mathematical operations within Mapper formulae.
INumericVariableToNumberConverter Provides conversion between the implemented types.
LBigDecimalRBigDecimalMathOp Number-valued mathematical formula operation where left operand is a BigDecimal and right operand is a BigDecimal.
LBigDecimalRDoubleMathOp Number-valued mathematical formula operation where left operand is a BigDecimal and right operand is a Double.
LBigDecimalRLongMathOp Number-valued mathematical formula operation where left operand is a BigDecimal and right operand is a Long.
LDoubleRBigDecimalMathOp Number-valued mathematical formula operation where left operand is a Double and right operand is a BigDecimal.
LDoubleRDoubleMathOp Number-valued mathematical formula operation where left operand is a Double and right operand is a Double.
LDoubleRLongMathOp Number-valued mathematical formula operation where left operand is a Double and right operand is a Long.
LLongRBigDecimalMathOp Number-valued mathematical formula operation where left operand is a Long and right operand is a BigDecimal.
LLongRDoubleMathOp Number-valued mathematical formula operation where left operand is a Long and right operand is a Double.
LLongRLongMathOp Number-valued mathematical formula operation where left operand is a Long and right operand is a Long.
LNumberRVariableMathOp Number-valued mathematical formula operation where left operand is a Number and right operand is an MJVariable.
LVariableRNumberMathOp Number-valued mathematical formula operation where left operand is an MJVariable and right operand is a Number.
LVariableRVariableMathOp Number-valued mathematical formula operation where left and right operands are both instances of MJVariable.
MathFunctionEvaluator Provides a basis for evaluation of non-trivial unary math functions.
MathOperation Defines the supported binary mathematical operations in the formula framework.
MJStringToNumberConverter Provides conversion between the implemented types.
NamespaceAccessor Provides a convenient means to look up a variable namespace based on the converted prefix in a formula.
NumberConverter Provides numeric type management utilities for number and string literal content.
NumberFunctionEvaluator Evaluates the unary math functions for numeric input.
NumberToNumericOperandConverter Provides conversion between the implemented types.
NumericOperand Provides an encapsulation for numeric content; using the encapsulation ensures that type-aware implementations of basic math operations will be used instead of default operator implementations.
NumericOperandToBigDecimalConverter Provides conversion between the implemented types.
NumericOperandToDoubleConverter Provides conversion between the implemented types.
NumericOperandToLongConverter Provides conversion between the implemented types.
NumericOperandToNumberConverter Provides conversion between the implemented types.
VariableAccessor Provides a convenient means to look up a Mapper variable from the appropriate namespace for use in a formula.
VariableFunctionEvaluator Evaluates the unary math functions for Mapper variable input.
VariableMathOp Provides common functionality for math operations with MJVariable operands.

Class: BinaryOperatorOverloader   next package

Forces overloading of standard operations for mathematical formulae. This allows preservation of scale and precision throughout a calculation. Treat this class as "thread-safe".
See Also:
Operation
public class com.arsi.mj.fml.impl.BinaryOperatorOverloader
  extends java.lang.Object
  implements org.springframework.expression.OperatorOverloader
Constructors
Ctor for initializing an instance of this class.
Parameters:
someMathOptions - determines if Java or Mapper number is evaluated.
public BinaryOperatorOverloader(java.util.EnumSet someMathOptions)
Methods
Execute the specified operation on two operands, returning a result. See MathOperation for supported operations.
Parameters:
anOperation - the operation to be performed
aLeftOperand - the left operand
aRightOperand - the right operand
Throws:
EvaluationException - if there is a problem performing the operation
Returns:
the result of performing the operation on the two operands
public java.lang.Object operate(com.arsi.mj.fml.impl.MathOperation anOperation, java.lang.Object aLeftOperand, java.lang.Object aRightOperand)
    throws org.springframework.expression.EvaluationException
Required implementation; provides hooks to the operator implementations.
See Also:
org.springframework.expression.OperatorOverloader#operate(org.springframework.expression.Operation, java.lang.Object, java.lang.Object)
public java.lang.Object operate(org.springframework.expression.Operation anOperation, java.lang.Object aLeftOperand, java.lang.Object aRightOperand)
    throws org.springframework.expression.EvaluationException
Required implementation; accepts all types that support math operations for overloading.
See Also:
org.springframework.expression.OperatorOverloader#overridesOperation(org.springframework.expression.Operation, java.lang.Object, java.lang.Object)
public boolean overridesOperation(org.springframework.expression.Operation anOperation, java.lang.Object aLeftOperand, java.lang.Object aRightOperand)
    throws org.springframework.expression.EvaluationException

Class: FormulaConversionService   previous next package

Provides formula-specific conversions.
public class com.arsi.mj.fml.impl.FormulaConversionService
  extends org.springframework.core.convert.support.DefaultConversionService
Constructors
Ctor for initializing an instance of this class.
public FormulaConversionService()

Class: FormulaTypeConverter   previous next package

Allows customization of the expression result handling so that numeric encapsulation does not cause errors.
public class com.arsi.mj.fml.impl.FormulaTypeConverter
  extends org.springframework.expression.spel.support.StandardTypeConverter
Constructors
Ctor for initializing an instance of this class.
public FormulaTypeConverter()
Methods
Customizes the expression result type handling to support unwrapping of the numeric data encapsulation used to force custom math operations.
See Also:
org.springframework.expression.spel.support.StandardTypeConverter#convertValue(java.lang.Object, org.springframework.core.convert.TypeDescriptor, org.springframework.core.convert.TypeDescriptor)
public java.lang.Object convertValue(java.lang.Object aValue, org.springframework.core.convert.TypeDescriptor aSourceType, org.springframework.core.convert.TypeDescriptor aTargetType)

Interface: IFmlBinaryOperation   previous next package

Defines the integration mechanism for binary mathematical operations within Mapper formulae. Implementations of this interface will group handling for operand tuples by type, and each interface will handle all possible operations.
Parameters:
<L> - the left operand provided to the operation
<R> - the right operand provided to the operation
<V> - the data type returned by the operation
public interface com.arsi.mj.fml.impl.IFmlBinaryOperation
Methods
Executes a binary operation for the provided operands.
Parameters:
anOperation - the mathematical operation to perform
aLeftOperand - the first operand provided to the operation
aRightOperand - the second operand provided to the operation
someOptions - any options to incorporate into the processing flow
Throws:
MJExecuteException - if any error occurs in performing the calculation
Returns:
the operation result
public java.lang.Object binaryOperation(com.arsi.mj.fml.impl.MathOperation anOperation, java.lang.Object aLeftOperand, java.lang.Object aRightOperand, java.util.EnumSet someOptions)
    throws com.arsi.mj.MJExecuteException

Class: INumericVariableToNumberConverter   previous next package

Provides conversion between the implemented types. s
public class com.arsi.mj.fml.impl.INumericVariableToNumberConverter
  extends java.lang.Object
  implements org.springframework.core.convert.converter.Converter
Constructors
public INumericVariableToNumberConverter()
Methods
Required implementation.
See Also:
org.springframework.core.convert.converter.Converter#convert(java.lang.Object)
public java.lang.Number convert(com.arsi.mj.variable.INumericVariable source)

Class: LBigDecimalRBigDecimalMathOp   previous next package

Number-valued mathematical formula operation where left operand is a BigDecimal and right operand is a BigDecimal.
public class com.arsi.mj.fml.impl.LBigDecimalRBigDecimalMathOp
  extends java.lang.Object
  implements com.arsi.mj.fml.impl.IFmlBinaryOperation
Constructors
public LBigDecimalRBigDecimalMathOp()
Methods
Implements binary mathematical operations for the above object types.
See Also:
com.arsi.mj.fml.impl.IFmlBinaryOperation#binaryOperation(com.arsi.mj.fml.impl.MathOperation, java.lang.Object, java.lang.Object, java.util.EnumSet)
public java.lang.Number binaryOperation(com.arsi.mj.fml.impl.MathOperation anOperation, java.math.BigDecimal aLeftOperand, java.math.BigDecimal aRightOperand, java.util.EnumSet someOptions)
    throws com.arsi.mj.MJExecuteException

Class: LBigDecimalRDoubleMathOp   previous next package

Number-valued mathematical formula operation where left operand is a BigDecimal and right operand is a Double.
public class com.arsi.mj.fml.impl.LBigDecimalRDoubleMathOp
  extends java.lang.Object
  implements com.arsi.mj.fml.impl.IFmlBinaryOperation
Constructors
public LBigDecimalRDoubleMathOp()
Methods
Implements binary mathematical operations for the above object types.
See Also:
com.arsi.mj.fml.impl.IFmlBinaryOperation#binaryOperation(com.arsi.mj.fml.impl.MathOperation, java.lang.Object, java.lang.Object, java.util.EnumSet)
public java.lang.Number binaryOperation(com.arsi.mj.fml.impl.MathOperation anOperation, java.math.BigDecimal aLeftOperand, java.lang.Double aRightOperand, java.util.EnumSet someOptions)
    throws com.arsi.mj.MJExecuteException

Class: LBigDecimalRLongMathOp   previous next package

Number-valued mathematical formula operation where left operand is a BigDecimal and right operand is a Long.
public class com.arsi.mj.fml.impl.LBigDecimalRLongMathOp
  extends java.lang.Object
  implements com.arsi.mj.fml.impl.IFmlBinaryOperation
Constructors
public LBigDecimalRLongMathOp()
Methods
Implements binary mathematical operations for the above object types.
See Also:
com.arsi.mj.fml.impl.IFmlBinaryOperation#binaryOperation(com.arsi.mj.fml.impl.MathOperation, java.lang.Object, java.lang.Object, java.util.EnumSet)
public java.lang.Number binaryOperation(com.arsi.mj.fml.impl.MathOperation anOperation, java.math.BigDecimal aLeftOperand, java.lang.Long aRightOperand, java.util.EnumSet someOptions)
    throws com.arsi.mj.MJExecuteException

Class: LDoubleRBigDecimalMathOp   previous next package

Number-valued mathematical formula operation where left operand is a Double and right operand is a BigDecimal.
public class com.arsi.mj.fml.impl.LDoubleRBigDecimalMathOp
  extends java.lang.Object
  implements com.arsi.mj.fml.impl.IFmlBinaryOperation
Constructors
public LDoubleRBigDecimalMathOp()
Methods
Implements binary mathematical operations for the above object types.
See Also:
com.arsi.mj.fml.impl.IFmlBinaryOperation#binaryOperation(com.arsi.mj.fml.impl.MathOperation, java.lang.Object, java.lang.Object, java.util.EnumSet)
public java.lang.Number binaryOperation(com.arsi.mj.fml.impl.MathOperation anOperation, java.lang.Double aLeftOperand, java.math.BigDecimal aRightOperand, java.util.EnumSet someOptions)
    throws com.arsi.mj.MJExecuteException

Class: LDoubleRDoubleMathOp   previous next package

Number-valued mathematical formula operation where left operand is a Double and right operand is a Double.
public class com.arsi.mj.fml.impl.LDoubleRDoubleMathOp
  extends java.lang.Object
  implements com.arsi.mj.fml.impl.IFmlBinaryOperation
Constructors
public LDoubleRDoubleMathOp()
Methods
Implements binary mathematical operations for the above object types.
See Also:
com.arsi.mj.fml.impl.IFmlBinaryOperation#binaryOperation(com.arsi.mj.fml.impl.MathOperation, java.lang.Object, java.lang.Object, java.util.EnumSet)
public java.lang.Number binaryOperation(com.arsi.mj.fml.impl.MathOperation anOperation, java.lang.Double aLeftOperand, java.lang.Double aRightOperand, java.util.EnumSet someOptions)
    throws com.arsi.mj.MJExecuteException

Class: LDoubleRLongMathOp   previous next package

Number-valued mathematical formula operation where left operand is a Double and right operand is a Long.
public class com.arsi.mj.fml.impl.LDoubleRLongMathOp
  extends java.lang.Object
  implements com.arsi.mj.fml.impl.IFmlBinaryOperation
Constructors
public LDoubleRLongMathOp()
Methods
Implements binary mathematical operations for the above object types.
See Also:
com.arsi.mj.fml.impl.IFmlBinaryOperation#binaryOperation(com.arsi.mj.fml.impl.MathOperation, java.lang.Object, java.lang.Object, java.util.EnumSet)
public java.lang.Number binaryOperation(com.arsi.mj.fml.impl.MathOperation anOperation, java.lang.Double aLeftOperand, java.lang.Long aRightOperand, java.util.EnumSet someOptions)
    throws com.arsi.mj.MJExecuteException

Class: LLongRBigDecimalMathOp   previous next package

Number-valued mathematical formula operation where left operand is a Long and right operand is a BigDecimal.
public class com.arsi.mj.fml.impl.LLongRBigDecimalMathOp
  extends java.lang.Object
  implements com.arsi.mj.fml.impl.IFmlBinaryOperation
Constructors
public LLongRBigDecimalMathOp()
Methods
Implements binary mathematical operations for the above object types.
See Also:
com.arsi.mj.fml.impl.IFmlBinaryOperation#binaryOperation(com.arsi.mj.fml.impl.MathOperation, java.lang.Object, java.lang.Object, java.util.EnumSet)
public java.lang.Number binaryOperation(com.arsi.mj.fml.impl.MathOperation anOperation, java.lang.Long aLeftOperand, java.math.BigDecimal aRightOperand, java.util.EnumSet someOptions)
    throws com.arsi.mj.MJExecuteException

Class: LLongRDoubleMathOp   previous next package

Number-valued mathematical formula operation where left operand is a Long and right operand is a Double.
public class com.arsi.mj.fml.impl.LLongRDoubleMathOp
  extends java.lang.Object
  implements com.arsi.mj.fml.impl.IFmlBinaryOperation
Constructors
public LLongRDoubleMathOp()
Methods
Implements binary mathematical operations for the above object types.
See Also:
com.arsi.mj.fml.impl.IFmlBinaryOperation#binaryOperation(com.arsi.mj.fml.impl.MathOperation, java.lang.Object, java.lang.Object, java.util.EnumSet)
public java.lang.Number binaryOperation(com.arsi.mj.fml.impl.MathOperation anOperation, java.lang.Long aLeftOperand, java.lang.Double aRightOperand, java.util.EnumSet someOptions)
    throws com.arsi.mj.MJExecuteException

Class: LLongRLongMathOp   previous next package

Number-valued mathematical formula operation where left operand is a Long and right operand is a Long.
public class com.arsi.mj.fml.impl.LLongRLongMathOp
  extends java.lang.Object
  implements com.arsi.mj.fml.impl.IFmlBinaryOperation
Constructors
public LLongRLongMathOp()
Methods
Implements binary mathematical operations for the above object types.
See Also:
com.arsi.mj.fml.impl.IFmlBinaryOperation#binaryOperation(com.arsi.mj.fml.impl.MathOperation, java.lang.Object, java.lang.Object, java.util.EnumSet)
public java.lang.Number binaryOperation(com.arsi.mj.fml.impl.MathOperation anOperation, java.lang.Long aLeftOperand, java.lang.Long aRightOperand, java.util.EnumSet someOptions)
    throws com.arsi.mj.MJExecuteException

Class: LNumberRVariableMathOp   previous next package

Number-valued mathematical formula operation where left operand is a Number and right operand is an MJVariable.
public class com.arsi.mj.fml.impl.LNumberRVariableMathOp
  extends com.arsi.mj.fml.impl.VariableMathOp
  implements com.arsi.mj.fml.impl.IFmlBinaryOperation
Constructors
public LNumberRVariableMathOp()
Methods
Implements binary mathematical operations for the above object types.
See Also:
com.arsi.mj.fml.impl.IFmlBinaryOperation#binaryOperation(com.arsi.mj.fml.impl.MathOperation, java.lang.Object, java.lang.Object, java.util.EnumSet)
public java.lang.Number binaryOperation(com.arsi.mj.fml.impl.MathOperation anOperation, java.lang.Number aLeftOperand, com.arsi.mj.variable.MJVariable aRightOperand, java.util.EnumSet someOptions)
    throws com.arsi.mj.MJExecuteException

Class: LVariableRNumberMathOp   previous next package

Number-valued mathematical formula operation where left operand is an MJVariable and right operand is a Number.
public class com.arsi.mj.fml.impl.LVariableRNumberMathOp
  extends com.arsi.mj.fml.impl.VariableMathOp
  implements com.arsi.mj.fml.impl.IFmlBinaryOperation
Constructors
public LVariableRNumberMathOp()
Methods
Implements binary mathematical operations for the above object types.
See Also:
com.arsi.mj.fml.impl.IFmlBinaryOperation#binaryOperation(com.arsi.mj.fml.impl.MathOperation, java.lang.Object, java.lang.Object, java.util.EnumSet)
public java.lang.Number binaryOperation(com.arsi.mj.fml.impl.MathOperation anOperation, com.arsi.mj.variable.MJVariable aLeftOperand, java.lang.Number aRightOperand, java.util.EnumSet someOptions)
    throws com.arsi.mj.MJExecuteException

Class: LVariableRVariableMathOp   previous next package

Number-valued mathematical formula operation where left and right operands are both instances of MJVariable.
public class com.arsi.mj.fml.impl.LVariableRVariableMathOp
  extends com.arsi.mj.fml.impl.VariableMathOp
  implements com.arsi.mj.fml.impl.IFmlBinaryOperation
Constructors
public LVariableRVariableMathOp()
Methods
Implements binary mathematical operations for the above object types.
See Also:
com.arsi.mj.fml.impl.IFmlBinaryOperation#binaryOperation(com.arsi.mj.fml.impl.MathOperation, java.lang.Object, java.lang.Object, java.util.EnumSet)
public java.lang.Number binaryOperation(com.arsi.mj.fml.impl.MathOperation anOperation, com.arsi.mj.variable.MJVariable aLeftOperand, com.arsi.mj.variable.MJVariable aRightOperand, java.util.EnumSet someOptions)
    throws com.arsi.mj.MJExecuteException
Selects the appropriate operand for conversion to the desired math calculation type.
Parameters:
<M> - the expected operand implementation type
aMathOperandClass - the class type the operand must implement
aLeftOperand - the left operand provided to the binary operator
aRightOperand - the right operand provided to the binary operator
Returns:
the converted operand
protected java.lang.Object convertToMathType(java.lang.Class aMathOperandClass, com.arsi.mj.variable.MJVariable aLeftOperand, com.arsi.mj.variable.MJVariable aRightOperand)

Class: MathFunctionEvaluator   previous next package

Provides a basis for evaluation of non-trivial unary math functions.
Parameters:
<M> - the input type to operate on
public abstract class com.arsi.mj.fml.impl.MathFunctionEvaluator
  extends java.lang.Object
Inner Class MathFunction
Defines the unary math functions available.
public static final class com.arsi.mj.fml.impl.MathFunctionEvaluator.MathFunction
  extends java.lang.Enum
Absolute value.
public static final com.arsi.mj.fml.impl.MathFunctionEvaluator.MathFunction ABS

Arc cosine.
public static final com.arsi.mj.fml.impl.MathFunctionEvaluator.MathFunction ACOS

Arc sine.
public static final com.arsi.mj.fml.impl.MathFunctionEvaluator.MathFunction ASIN

Arc tangent.
public static final com.arsi.mj.fml.impl.MathFunctionEvaluator.MathFunction ATAN

Cube root.
public static final com.arsi.mj.fml.impl.MathFunctionEvaluator.MathFunction CBRT

Cosine.
public static final com.arsi.mj.fml.impl.MathFunctionEvaluator.MathFunction COS

Cotangent.
public static final com.arsi.mj.fml.impl.MathFunctionEvaluator.MathFunction CTN

Convert to degrees.
public static final com.arsi.mj.fml.impl.MathFunctionEvaluator.MathFunction DEG

Fractional component.
public static final com.arsi.mj.fml.impl.MathFunctionEvaluator.MathFunction FRAC

Hyperbolic cosine.
public static final com.arsi.mj.fml.impl.MathFunctionEvaluator.MathFunction HCOS

Hyperbolic sine.
public static final com.arsi.mj.fml.impl.MathFunctionEvaluator.MathFunction HSIN

Hyperbolic tangent.
public static final com.arsi.mj.fml.impl.MathFunctionEvaluator.MathFunction HTAN

Natural log.
public static final com.arsi.mj.fml.impl.MathFunctionEvaluator.MathFunction LOG

Log base 10.
public static final com.arsi.mj.fml.impl.MathFunctionEvaluator.MathFunction LOG10

Convert to radians.
public static final com.arsi.mj.fml.impl.MathFunctionEvaluator.MathFunction RAD

Sine.
public static final com.arsi.mj.fml.impl.MathFunctionEvaluator.MathFunction SIN

Square root.
public static final com.arsi.mj.fml.impl.MathFunctionEvaluator.MathFunction SQRT

Tangent.
public static final com.arsi.mj.fml.impl.MathFunctionEvaluator.MathFunction TAN

public static com.arsi.mj.fml.impl.MathFunctionEvaluator.MathFunction valueOf(java.lang.String name)
public static com.arsi.mj.fml.impl.MathFunctionEvaluator.MathFunction values()
Constructors
public MathFunctionEvaluator()
Methods
Absolute value or magnitude of number.
Parameters:
aValue - value for which function is determined
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT)
Returns:
the function evaluation result
public com.arsi.mj.fml.impl.NumericOperand abs(java.lang.Object aValue, java.util.EnumSet someOptions)
Arc cosine of number in radians.
Parameters:
aValue - value for which function is determined
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT)
Returns:
the function evaluation result
public com.arsi.mj.fml.impl.NumericOperand acos(java.lang.Object aValue, java.util.EnumSet someOptions)
Arc sine of number in radians.
Parameters:
aValue - value for which function is determined
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT)
Returns:
the function evaluation result
public com.arsi.mj.fml.impl.NumericOperand asin(java.lang.Object aValue, java.util.EnumSet someOptions)
Arc tangent of number in radians.
Parameters:
aValue - value for which function is determined
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT)
Returns:
the function evaluation result
public com.arsi.mj.fml.impl.NumericOperand atan(java.lang.Object aValue, java.util.EnumSet someOptions)
Cube root of number.
Parameters:
aValue - value for which function is determined
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT)
Returns:
the function evaluation result
public com.arsi.mj.fml.impl.NumericOperand cbrt(java.lang.Object aValue, java.util.EnumSet someOptions)
Cosine of number in radians.
Parameters:
aValue - value for which function is determined
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT)
Returns:
the function evaluation result
public com.arsi.mj.fml.impl.NumericOperand cos(java.lang.Object aValue, java.util.EnumSet someOptions)
Cotangent of number in radians.
Parameters:
aValue - value for which function is determined
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT)
Returns:
the function evaluation result
public com.arsi.mj.fml.impl.NumericOperand ctn(java.lang.Object aValue, java.util.EnumSet someOptions)
Value of number (assumed to be radians) expressed in degrees.
Parameters:
aValue - value for which function is determined
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT)
Returns:
the function evaluation result
public com.arsi.mj.fml.impl.NumericOperand deg(java.lang.Object aValue, java.util.EnumSet someOptions)
Provides appropriate implementations for all supported functions.
Parameters:
aFunction - the function to evaluate
aValue - the value to operate on
someOptions - any provided options
Returns:
the encapsulated function result
protected abstract com.arsi.mj.fml.impl.NumericOperand executeFunction(com.arsi.mj.fml.impl.MathFunctionEvaluator.MathFunction aFunction, java.lang.Object aValue, java.util.EnumSet someOptions)
Fractional portion of number.
Parameters:
aValue - value for which function is determined
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT)
Returns:
the function evaluation result
public com.arsi.mj.fml.impl.NumericOperand frac(java.lang.Object aValue, java.util.EnumSet someOptions)
Hyperbolic cosine of number in radians.
Parameters:
aValue - value for which function is determined
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT)
Returns:
the function evaluation result
public com.arsi.mj.fml.impl.NumericOperand hcos(java.lang.Object aValue, java.util.EnumSet someOptions)
Hyperbolic sine of number in radians.
Parameters:
aValue - value for which function is determined
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT)
Returns:
the function evaluation result
public com.arsi.mj.fml.impl.NumericOperand hsin(java.lang.Object aValue, java.util.EnumSet someOptions)
Hyperbolic tangent of number in radians.
Parameters:
aValue - value for which function is determined
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT)
Returns:
the function evaluation result
public com.arsi.mj.fml.impl.NumericOperand htan(java.lang.Object aValue, java.util.EnumSet someOptions)
Logarithm of number in base e.
Parameters:
aValue - value for which function is determined
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT)
Returns:
the function evaluation result
public com.arsi.mj.fml.impl.NumericOperand log(java.lang.Object aValue, java.util.EnumSet someOptions)
Logarithm of number in base 10.
Parameters:
aValue - value for which function is determined
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT)
Returns:
the function evaluation result
public com.arsi.mj.fml.impl.NumericOperand log10(java.lang.Object aValue, java.util.EnumSet someOptions)
Value of number (assumed to be degrees) expressed in radians.
Parameters:
aValue - value for which function is determined
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT)
Returns:
the function evaluation result
public com.arsi.mj.fml.impl.NumericOperand rad(java.lang.Object aValue, java.util.EnumSet someOptions)
Sine of number (assumed to be radians).
Parameters:
aValue - value for which function is determined
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT)
Returns:
the function evaluation result
public com.arsi.mj.fml.impl.NumericOperand sin(java.lang.Object aValue, java.util.EnumSet someOptions)
Square root of number.
Parameters:
aValue - value for which function is determined
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT)
Returns:
the function evaluation result
public com.arsi.mj.fml.impl.NumericOperand sqrt(java.lang.Object aValue, java.util.EnumSet someOptions)
Tangent of number (assumed to be radians).
Parameters:
aValue - value for which function is determined
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT)
Returns:
the function evaluation result
public com.arsi.mj.fml.impl.NumericOperand tan(java.lang.Object aValue, java.util.EnumSet someOptions)

Class: MathOperation   previous next package

Defines the supported binary mathematical operations in the formula framework.
public final class com.arsi.mj.fml.impl.MathOperation
  extends java.lang.Enum
Fields
Indicates that addition should be performed.
public static final com.arsi.mj.fml.impl.MathOperation ADD
Indicates that division should be performed.
public static final com.arsi.mj.fml.impl.MathOperation DIVIDE
Indicates that integer division should be performed.
public static final com.arsi.mj.fml.impl.MathOperation DIVIDE_INTEGRAL
Indicates that modulus evaluation should be performed.
public static final com.arsi.mj.fml.impl.MathOperation MODULUS
Indicates that multiplication should be performed.
public static final com.arsi.mj.fml.impl.MathOperation MULTIPLY
Indicates that exponentiation should be performed.
public static final com.arsi.mj.fml.impl.MathOperation POWER
Indicates that subtraction should be performed.
public static final com.arsi.mj.fml.impl.MathOperation SUBTRACT
Methods
Determines the operation that corresponds a Spring-generated operation.
Parameters:
anOverloadedOperation - the Spring operation to cross-reference
Returns:
the corresponding operation, or null if no match is found
public static com.arsi.mj.fml.impl.MathOperation lookup(org.springframework.expression.Operation anOverloadedOperation)
public static com.arsi.mj.fml.impl.MathOperation valueOf(java.lang.String name)
public static com.arsi.mj.fml.impl.MathOperation values()

Class: MJStringToNumberConverter   previous next package

Provides conversion between the implemented types. s
public class com.arsi.mj.fml.impl.MJStringToNumberConverter
  extends java.lang.Object
  implements org.springframework.core.convert.converter.Converter
Constructors
Ctor for initializing an instance of this class.
Parameters:
aConverter - the converter to use for numeric conversion
public MJStringToNumberConverter(org.springframework.expression.spel.support.StandardTypeConverter aConverter)
Methods
Required implementation.
See Also:
org.springframework.core.convert.converter.Converter#convert(java.lang.Object)
public java.lang.Number convert(com.arsi.mj.variable.MJString source)

Class: NamespaceAccessor   previous next package

Provides a convenient means to look up a variable namespace based on the converted prefix in a formula.
public class com.arsi.mj.fml.impl.NamespaceAccessor
  extends java.lang.Object
  implements org.springframework.expression.PropertyAccessor
Constructors
public NamespaceAccessor()
Methods
Supports evaluation of all potential namespace prefixes.
See Also:
org.springframework.expression.PropertyAccessor#canRead(org.springframework.expression.EvaluationContext, java.lang.Object, java.lang.String)
public boolean canRead(org.springframework.expression.EvaluationContext context, java.lang.Object target, java.lang.String name)
    throws org.springframework.expression.AccessException
No write access is permitted.
See Also:
org.springframework.expression.PropertyAccessor#canWrite(org.springframework.expression.EvaluationContext, java.lang.Object, java.lang.String)
public boolean canWrite(org.springframework.expression.EvaluationContext context, java.lang.Object target, java.lang.String name)
    throws org.springframework.expression.AccessException
Required implementation.
See Also:
org.springframework.expression.PropertyAccessor#getSpecificTargetClasses()
public java.lang.Class getSpecificTargetClasses()
Accesses the identified namespace for further variable lookup.
See Also:
org.springframework.expression.PropertyAccessor#read(org.springframework.expression.EvaluationContext, java.lang.Object, java.lang.String)
public org.springframework.expression.TypedValue read(org.springframework.expression.EvaluationContext context, java.lang.Object target, java.lang.String name)
    throws org.springframework.expression.AccessException
No write access is permitted.
See Also:
org.springframework.expression.PropertyAccessor#write(org.springframework.expression.EvaluationContext, java.lang.Object, java.lang.String, java.lang.Object)
public void write(org.springframework.expression.EvaluationContext context, java.lang.Object target, java.lang.String name, java.lang.Object newValue)
    throws org.springframework.expression.AccessException

Class: NumberConverter   previous next package

Provides numeric type management utilities for number and string literal content.
public class com.arsi.mj.fml.impl.NumberConverter
  extends java.lang.Object
Constructors
public NumberConverter()
Methods
Converts a numeric literal into an MJ-supported math operand.
Parameters:
aNumericLiteral - the literal value to process
Returns:
the encapsulated result
public static com.arsi.mj.fml.impl.NumericOperand convertNumberToOperand(java.lang.Number aNumericLiteral)
Converts a string literal with numeric content into an appropriate numeric type.
Parameters:
aStringLiteral - the text value to parse
someMathOptions - used to determine the floating-point precision used
Returns:
the encapsulated result
public static java.lang.Number convertNumericString(java.lang.String aStringLiteral, java.util.EnumSet someMathOptions)
Converts a string literal with numeric content into an MJ-supported math operand.
Parameters:
aStringLiteral - the text value to parse
someMathOptions - used to determine the floating-point precision used
Returns:
the encapsulated result
public static com.arsi.mj.fml.impl.NumericOperand convertNumericStringToOperand(java.lang.String aStringLiteral, java.util.EnumSet someMathOptions)

Class: NumberFunctionEvaluator   previous next package

Evaluates the unary math functions for numeric input.
public class com.arsi.mj.fml.impl.NumberFunctionEvaluator
  extends com.arsi.mj.fml.impl.MathFunctionEvaluator
Constructors
public NumberFunctionEvaluator()
Methods
Required implementation.
See Also:
com.arsi.mj.fml.impl.MathFunctionEvaluator#executeFunction(com.arsi.mj.fml.impl.MathFunctionEvaluator.MathFunction, java.lang.Object, java.util.EnumSet[])
protected com.arsi.mj.fml.impl.NumericOperand executeFunction(com.arsi.mj.fml.impl.MathFunctionEvaluator.MathFunction aFunction, java.lang.Number aValue, java.util.EnumSet someOptions)

Class: NumberToNumericOperandConverter   previous next package

Provides conversion between the implemented types. s
public class com.arsi.mj.fml.impl.NumberToNumericOperandConverter
  extends java.lang.Object
  implements org.springframework.core.convert.converter.Converter
Constructors
public NumberToNumericOperandConverter()
Methods
Required implementation.
See Also:
org.springframework.core.convert.converter.Converter#convert(java.lang.Object)
public com.arsi.mj.fml.impl.NumericOperand convert(java.lang.Number source)

Class: NumericOperand   previous next package

Provides an encapsulation for numeric content; using the encapsulation ensures that type-aware implementations of basic math operations will be used instead of default operator implementations.
public class com.arsi.mj.fml.impl.NumericOperand
  extends java.lang.Object
Fields
The value of the operand.
public final java.lang.Number value
Constructors
public NumericOperand(java.lang.Number value)

Class: NumericOperandToBigDecimalConverter   previous next package

Provides conversion between the implemented types. s
public class com.arsi.mj.fml.impl.NumericOperandToBigDecimalConverter
  extends java.lang.Object
  implements org.springframework.core.convert.converter.Converter
Constructors
public NumericOperandToBigDecimalConverter()
Methods
Required implementation.
See Also:
org.springframework.core.convert.converter.Converter#convert(java.lang.Object)
public java.math.BigDecimal convert(com.arsi.mj.fml.impl.NumericOperand source)

Class: NumericOperandToDoubleConverter   previous next package

Provides conversion between the implemented types. s
public class com.arsi.mj.fml.impl.NumericOperandToDoubleConverter
  extends java.lang.Object
  implements org.springframework.core.convert.converter.Converter
Constructors
public NumericOperandToDoubleConverter()
Methods
Required implementation.
See Also:
org.springframework.core.convert.converter.Converter#convert(java.lang.Object)
public java.lang.Double convert(com.arsi.mj.fml.impl.NumericOperand source)

Class: NumericOperandToLongConverter   previous next package

Provides conversion between the implemented types. s
public class com.arsi.mj.fml.impl.NumericOperandToLongConverter
  extends java.lang.Object
  implements org.springframework.core.convert.converter.Converter
Constructors
public NumericOperandToLongConverter()
Methods
Required implementation.
See Also:
org.springframework.core.convert.converter.Converter#convert(java.lang.Object)
public java.lang.Long convert(com.arsi.mj.fml.impl.NumericOperand source)

Class: NumericOperandToNumberConverter   previous next package

Provides conversion between the implemented types. s
public class com.arsi.mj.fml.impl.NumericOperandToNumberConverter
  extends java.lang.Object
  implements org.springframework.core.convert.converter.Converter
Constructors
public NumericOperandToNumberConverter()
Methods
Required implementation.
See Also:
org.springframework.core.convert.converter.Converter#convert(java.lang.Object)
public java.lang.Number convert(com.arsi.mj.fml.impl.NumericOperand source)

Class: VariableAccessor   previous next package

Provides a convenient means to look up a Mapper variable from the appropriate namespace for use in a formula.
public class com.arsi.mj.fml.impl.VariableAccessor
  extends java.lang.Object
  implements org.springframework.expression.PropertyAccessor
Constructors
public VariableAccessor()
Methods
Supports local variable resolution if no namespace has been provided.
See Also:
org.springframework.expression.PropertyAccessor#canRead(org.springframework.expression.EvaluationContext, java.lang.Object, java.lang.String)
public boolean canRead(org.springframework.expression.EvaluationContext context, java.lang.Object target, java.lang.String name)
    throws org.springframework.expression.AccessException
No write access is permitted.
See Also:
org.springframework.expression.PropertyAccessor#canWrite(org.springframework.expression.EvaluationContext, java.lang.Object, java.lang.String)
public boolean canWrite(org.springframework.expression.EvaluationContext context, java.lang.Object target, java.lang.String name)
    throws org.springframework.expression.AccessException
Supports introspection of both the formula context or a namespace.
See Also:
org.springframework.expression.PropertyAccessor#getSpecificTargetClasses()
public java.lang.Class getSpecificTargetClasses()
Retrieves the variable content.
See Also:
org.springframework.expression.PropertyAccessor#read(org.springframework.expression.EvaluationContext, java.lang.Object, java.lang.String)
public org.springframework.expression.TypedValue read(org.springframework.expression.EvaluationContext context, java.lang.Object target, java.lang.String name)
    throws org.springframework.expression.AccessException
No write access is permitted.
See Also:
org.springframework.expression.PropertyAccessor#write(org.springframework.expression.EvaluationContext, java.lang.Object, java.lang.String, java.lang.Object)
public void write(org.springframework.expression.EvaluationContext context, java.lang.Object target, java.lang.String name, java.lang.Object newValue)
    throws org.springframework.expression.AccessException

Class: VariableFunctionEvaluator   previous next package

Evaluates the unary math functions for Mapper variable input.
public class com.arsi.mj.fml.impl.VariableFunctionEvaluator
  extends com.arsi.mj.fml.impl.MathFunctionEvaluator
Constructors
public VariableFunctionEvaluator()
Methods
Required implementation.
See Also:
com.arsi.mj.fml.impl.MathFunctionEvaluator#executeFunction(com.arsi.mj.fml.impl.MathFunctionEvaluator.MathFunction, java.lang.Object, java.util.EnumSet[])
protected com.arsi.mj.fml.impl.NumericOperand executeFunction(com.arsi.mj.fml.impl.MathFunctionEvaluator.MathFunction aFunction, com.arsi.mj.variable.MJVariable aValue, java.util.EnumSet someOptions)

Class: VariableMathOp   previous package

Provides common functionality for math operations with MJVariable operands.
public abstract class com.arsi.mj.fml.impl.VariableMathOp
  extends java.lang.Object
Constructors
public VariableMathOp()
Methods
Converts the operand to the desired math calculation type. Unchecked conversion is needed due to the nature of Java generics.
Parameters:
<M> - the expected operand implementation type
aMathOperandClass - the class type the operand must implement
anOperand - the target operand
Returns:
the converted operand
protected java.lang.Object convertToMathType(java.lang.Class aMathOperandClass, com.arsi.mj.variable.MJVariable anOperand)