Class VariableTable

java.lang.Object
java.util.Dictionary
java.util.Hashtable
gov.nih.mipav.model.scripting.VariableTable
All Implemented Interfaces:
Serializable, Cloneable, Map

public class VariableTable extends Hashtable
A table used to store variables and their values.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
    • singletonReference

      protected static VariableTable singletonReference
      The reference to the only VariableTable which should ever be instantiated.
  • Constructor Details

    • VariableTable

      protected VariableTable()
      Creates a new VariableTable object.
  • Method Details

    • getReference

      public static final VariableTable getReference()
      Returns a reference to the variable table singleton.
      Returns:
      A reference to the variable table.
    • interpolate

      public String interpolate(String varName)
      Interpolates and returns the value of a given variable.
      Parameters:
      varName - The name of the variable to interpolate.
      Returns:
      The variable's value.
    • isVariableSet

      public boolean isVariableSet(String varName)
      Checks to see if a variable has been added to the variable table.
      Parameters:
      varName - The name of the variable to check for.
      Returns:
      True if the variable has been added to the table, false otherwise.
    • removeVariable

      public void removeVariable(String varName)
      Removes a variable and its value from the variable table.
      Parameters:
      varName - The name of the variable to remove.
    • storeVariable

      public void storeVariable(String varName, String value)
      Stores a variable name and its value in the variable table.
      Parameters:
      varName - The name of the variable (e.g., '$save_as_file_name').
      value - The variable value.