public class ConstantsReferencesDefault extends java.lang.Object implements ConstantsReferences
Modifier and Type | Field and Description |
---|---|
private static java.lang.String[] |
SYMBOLS_NAMES
Symbols name
|
private static int |
SYMBOLS_NUMBER
Actual number of symbol define
|
private static double[] |
SYMBOLS_VALUES
Value of symbols
|
private java.util.Hashtable<java.lang.String,java.lang.Double> |
table
Table of associate symbol<->value
|
Constructor and Description |
---|
ConstantsReferencesDefault()
Constructs an empty constant reference
|
Modifier and Type | Method and Description |
---|---|
Function |
constantFunction(java.lang.String constant)
Constant on function representation
|
void |
defineConstant(java.lang.String nom,
double valeur)
Define a constant
|
static ConstantsReferences |
getReferentielConstanteCourant()
Create default constant reference
|
boolean |
isConstantDefine(java.lang.String constant)
Indicate if constants is define
|
double |
obtainConstantValue(java.lang.String constant)
Constant value
|
private static final java.lang.String[] SYMBOLS_NAMES
private static final int SYMBOLS_NUMBER
private static final double[] SYMBOLS_VALUES
private final java.util.Hashtable<java.lang.String,java.lang.Double> table
public ConstantsReferencesDefault()
public static ConstantsReferences getReferentielConstanteCourant()
public Function constantFunction(java.lang.String constant)
constantFunction
in interface ConstantsReferences
constant
- SymbolConstantsReferences.constantFunction(java.lang.String)
public void defineConstant(java.lang.String nom, double valeur)
defineConstant
in interface ConstantsReferences
nom
- Constant namevaleur
- Constant valueConstantsReferences.defineConstant(java.lang.String, double)
public boolean isConstantDefine(java.lang.String constant)
isConstantDefine
in interface ConstantsReferences
constant
- Symbol testedtrue
if constants is defineeConstantsReferences.isConstantDefine(java.lang.String)
public double obtainConstantValue(java.lang.String constant)
obtainConstantValue
in interface ConstantsReferences
constant
- Symbol searchConstantsReferences.obtainConstantValue(java.lang.String)