Package chemaxon.jep

Class ConstantTable

java.lang.Object
chemaxon.jep.ConstantTable

@PublicApi public final class ConstantTable extends Object
Immutable table of constants used in a Chemical Terms evaluator.
  • Field Details

    • EMPTY

      public static final ConstantTable EMPTY
      An empty constant table.
  • Method Details

    • builder

      public static ConstantTableBuilder builder()
      Creates a new builder for a constant table.
      Returns:
      a new builder
    • constants

      public Set<String> constants()
      Returns an immutable set containing the names of the constants in this table.
      Returns:
      the names of constants in this table
    • containsConstant

      public boolean containsConstant(String name)
      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

      public Object getClonedValue(String name)
      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