Package chemaxon.jep
Class ConstantTable
java.lang.Object
chemaxon.jep.ConstantTable
Immutable table of constants used in a Chemical Terms evaluator.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ConstantTableBuilder
builder()
Creates a new builder for a constant table.Returns an immutable set containing the names of the constants in this table.boolean
containsConstant
(String name) Returns true if this table contains the given constant.getClonedValue
(String name) Returns the value of a constant.
-
Field Details
-
EMPTY
An empty constant table.
-
-
Method Details
-
builder
Creates a new builder for a constant table.- Returns:
- a new builder
-
constants
Returns an immutable set containing the names of the constants in this table.- Returns:
- the names of constants in this table
-
containsConstant
Returns true if this table contains the given constant.- Parameters:
name
- the name of the constant- Returns:
- whether the constant is present in this table
-
getClonedValue
Returns the value of a constant. If the value is a mutable object, it is cloned before returning.- Parameters:
name
- the name of the constant- Returns:
- the immutable or cloned value of the constant
-