|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.formulacompiler.runtime.FormulaRuntime org.formulacompiler.compiler.FormulaCompiler
public class FormulaCompiler
Static class defining factory methods for the various elements of the core AFC compiler. This
class is extends by FormulaRuntime
which provides factory
methods for the run-time-only elements.
Field Summary | |
---|---|
static NumericType |
BIGDECIMAL_SCALE8
BigDecimal with a fixed scale of 8 and using BigDecimal.ROUND_HALF_UP . |
static NumericType |
BIGDECIMAL_SCALE9
BigDecimal with a fixed scale of 9 and using BigDecimal.ROUND_HALF_UP . |
static NumericType |
BIGDECIMAL128
BigDecimal with the MathContext.DECIMAL128 math context. |
static NumericType |
BIGDECIMAL32
BigDecimal with the MathContext.DECIMAL32 math context. |
static NumericType |
BIGDECIMAL64
BigDecimal with the MathContext.DECIMAL64 math context. |
static NumericType |
DEFAULT_NUMERIC_TYPE
Default type used when no explicit type is specified. |
static NumericType |
DOUBLE
Default type, consistent with the type used internally by Excel and other spreadsheet applications. |
static NumericType |
LONG
Unscaled long for fast, strictly integer computations. |
static NumericType |
LONG_SCALE4
long scaled to 4 decimal places for fast, fixed point computations (similar to the
currency type found in Borland Delphi). |
static NumericType |
LONG_SCALE6
long scaled to 6 decimal places for fast, fixed point computations with sufficient
precision for seconds in time values. |
Fields inherited from class org.formulacompiler.runtime.FormulaRuntime |
---|
UNDEFINED_SCALE |
Constructor Summary | |
---|---|
FormulaCompiler()
|
Method Summary | |
---|---|
static NumericType |
getNumericType(java.lang.Class _valueType)
Same as getNumericType(Class, int, int) with an undefined scale and truncating
results. |
static NumericType |
getNumericType(java.lang.Class _valueType,
int _scale)
Same as getNumericType(Class, int, int) and truncating results. |
static NumericType |
getNumericType(java.lang.Class _valueType,
int _scale,
int _roundingMode)
Returns the numeric type instance with the specified attributes. |
static NumericType |
getNumericType(java.lang.Class _valueType,
java.math.MathContext _mathContext)
Returns the numeric type instance with the specified attributes. |
static CallFrame |
newCallFrame(java.lang.reflect.Method _method,
java.lang.Object... _args)
Constructs a call, possibly the initial call in a chain of calls. |
Methods inherited from class org.formulacompiler.runtime.FormulaRuntime |
---|
loadEngine, loadEngine |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final NumericType DOUBLE
public static final NumericType BIGDECIMAL32
MathContext.DECIMAL32
math context.
public static final NumericType BIGDECIMAL64
MathContext.DECIMAL64
math context.
public static final NumericType BIGDECIMAL128
MathContext.DECIMAL128
math context.
public static final NumericType BIGDECIMAL_SCALE8
BigDecimal.ROUND_HALF_UP
.
public static final NumericType BIGDECIMAL_SCALE9
BigDecimal.ROUND_HALF_UP
. This type has
the same precision as DOUBLE
for the automated tests.
public static final NumericType LONG
long
for fast, strictly integer computations.
Support for long
might be dropped unless we see real demand.
public static final NumericType LONG_SCALE4
long
scaled to 4 decimal places for fast, fixed point computations (similar to the
currency type found in Borland Delphi). Beware: this type has insufficient precision for
seconds in time values.
Support for long
might be dropped unless we see real demand.
public static final NumericType LONG_SCALE6
long
scaled to 6 decimal places for fast, fixed point computations with sufficient
precision for seconds in time values.
Support for long
might be dropped unless we see real demand.
public static final NumericType DEFAULT_NUMERIC_TYPE
Constructor Detail |
---|
public FormulaCompiler()
Method Detail |
---|
public static CallFrame newCallFrame(java.lang.reflect.Method _method, java.lang.Object... _args)
_method
- is the method to be called._args
- is the list of arguments for the method's parameters.public static NumericType getNumericType(java.lang.Class _valueType, int _scale, int _roundingMode)
_valueType
- must be either Double.TYPE
, Long.TYPE
, or
BigDecimal.class
._scale
- defines the number of decimal places after the point to which the base type is
scaled. Only supported for Long and BigDecimal._roundingMode
- defines the rounding mode to use when establishing the scale. Only
supported for BigDecimal.
public static NumericType getNumericType(java.lang.Class _valueType)
getNumericType(Class, int, int)
with an undefined scale and truncating
results.
public static NumericType getNumericType(java.lang.Class _valueType, int _scale)
getNumericType(Class, int, int)
and truncating results.
public static NumericType getNumericType(java.lang.Class _valueType, java.math.MathContext _mathContext)
_valueType
- must be BigDecimal.class
._mathContext
- defines the precision and rounding mode used to limit intermediate and
final results.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |