org.formulacompiler.runtime
Class Computation.Config

java.lang.Object
  extended by org.formulacompiler.runtime.Computation.Config
Enclosing interface:
Computation

public static final class Computation.Config
extends java.lang.Object

Provides configuration information for an execution environment for computations.

Please refer to the tutorial for details.

Author:
peo

Field Summary
 CellComputationListener cellComputationListener
          This listener is invoked when a cell value is computed.
 java.nio.charset.Charset charset
          Charset, which is used in CHAR and CODE functions.
 java.text.DecimalFormatSymbols decimalFormatSymbols
          A set of symbols (such as the decimal separator, the grouping separator, and so on) needed to format numbers.
 java.util.Locale locale
          Locale to use for, for example, labelling weekdays and months.
 java.util.TimeZone timeZone
          Time zone to use to, for example, convert spreadsheet-internal numeric dates to Date.
 
Constructor Summary
Computation.Config()
          Uses default settings for all fields.
Computation.Config(java.util.Locale _locale)
          Overrides the locale field.
Computation.Config(java.util.Locale _locale, java.text.DecimalFormatSymbols _decimalFormatSymbols)
          Overrides the locale, and decimalFormatSymbols fields.
Computation.Config(java.util.Locale _locale, java.text.DecimalFormatSymbols _decimalFormatSymbols, java.util.TimeZone _timeZone)
          Overrides the locale, and decimalFormatSymbols, and timeZone fields.
Computation.Config(java.util.Locale _locale, java.util.TimeZone _timeZone)
          Overrides the locale and timeZone fields.
Computation.Config(java.util.TimeZone _timeZone)
          Overrides the timeZone field.
 
Method Summary
 java.lang.String toString()
           
 void validate()
          Validates the configuration for missing or improperly set values.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

locale

public java.util.Locale locale
Locale to use for, for example, labelling weekdays and months. If left null will use the default locale at the time the computation is run.


decimalFormatSymbols

public java.text.DecimalFormatSymbols decimalFormatSymbols
A set of symbols (such as the decimal separator, the grouping separator, and so on) needed to format numbers. If this field is not set, the default values for the locale are used.


timeZone

public java.util.TimeZone timeZone
Time zone to use to, for example, convert spreadsheet-internal numeric dates to Date. If left null will use the default time zone at the time the computation is run.


charset

public java.nio.charset.Charset charset
Charset, which is used in CHAR and CODE functions. If left null, the default charset for the locale will be used.


cellComputationListener

public CellComputationListener cellComputationListener
This listener is invoked when a cell value is computed. The engine should be compiled with debug support.

Constructor Detail

Computation.Config

public Computation.Config()
Uses default settings for all fields.


Computation.Config

public Computation.Config(java.util.Locale _locale)
Overrides the locale field.


Computation.Config

public Computation.Config(java.util.TimeZone _timeZone)
Overrides the timeZone field.


Computation.Config

public Computation.Config(java.util.Locale _locale,
                          java.util.TimeZone _timeZone)
Overrides the locale and timeZone fields.


Computation.Config

public Computation.Config(java.util.Locale _locale,
                          java.text.DecimalFormatSymbols _decimalFormatSymbols)
Overrides the locale, and decimalFormatSymbols fields.


Computation.Config

public Computation.Config(java.util.Locale _locale,
                          java.text.DecimalFormatSymbols _decimalFormatSymbols,
                          java.util.TimeZone _timeZone)
Overrides the locale, and decimalFormatSymbols, and timeZone fields.

Method Detail

validate

public void validate()
Validates the configuration for missing or improperly set values.

Throws:
java.lang.IllegalArgumentException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object