Class ExtrinsicVar

  • All Implemented Interfaces:
    Serializable, QDLVariable

    public class ExtrinsicVar
    extends Object
    implements QDLVariable
    An extrinsic (aka global, static in other langauges) variable in the workspace. Note that this is available after the module loads, hence before import. It has a value of 42, since, as we all know, that is the answer to everything.
    See Also:
    Serialized Form
    • Field Detail

      • EX_NAME

        public static String EX_NAME
    • Constructor Detail

      • ExtrinsicVar

        public ExtrinsicVar()
    • Method Detail

      • getName

        public String getName()
        Description copied from interface: QDLVariable
        The name of the variable. This may be a simple name for a scalar, like "a", or it may represent a stem, like "a." (yes, include the period for a stem). You may even set specific stem values by passing in the indexed stem, e.g. "a.3". It might make sense, if e.g. you had a stem that modelled String Theory where the stem is an 11 dimensional object that required a great deal of computation only do-able in Java (such as a specialized scientific library which would be a hugely complex job to expose in QDL). You could then just set each component of the stem.

        A note on extrinsic values

        Extrinsic values start with a $$ (VariableState.EXTRINSIC_MARKER) and when the module is loaded, these are put into the workspace -- not at import. This lets you have module constants in advance of configuration the module.

        Specified by:
        getName in interface QDLVariable
        Returns:
      • getValue

        public Object getValue()
        Description copied from interface: QDLVariable
        The value. The basic Java types that QDL knows are Boolean, String, Long, BigDecimal, edu.uiuc.ncsa.qdl.variables.QDLSet and QDLStem. Again, this class sets the value and is used to create a single instance of this variable in the workspace, so there should be no state to manage in this class -- just return the value it should have.
        Specified by:
        getValue in interface QDLVariable
        Returns: