Documentation of 'visad.formula.FormulaManager' Java class
FormulaManager
visad.formula

Class FormulaManager



  • public class FormulaManager
    extends java.lang.Object
    The FormulaManager class is the gateway into the visad.formula package, a general-purpose formula parser and evaluator. Variables update automatically when the variables upon which they depend change. For an example of usage, see the FormulaUtil.createStandardManager() method.

    • Constructor Summary

      Constructors 
      Constructor and Description
      FormulaManager(java.lang.String[] binOps, int[] binPrec, java.lang.String[] binMethods, java.lang.String[] unaryOps, int[] unaryPrec, java.lang.String[] unaryMethods, java.lang.String[] functions, java.lang.String[] funcMethods, int implicitPrec, java.lang.String[] implicitMethods, java.lang.String preParseMethod)
      construct a new FormulaManager object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void assignFormula(java.lang.String name, java.lang.String formula)
      assign a formula to a variable
      boolean canBeRemoved(java.lang.String name)
      check whether it is safe to remove a variable from the database
      void createVar(java.lang.String name, ThingReference tr)
      add a variable to the database that uses tr as its ThingReference
      boolean exists(java.lang.String name)
      check whether a given variable is currently in the database
      java.lang.String[] getErrors(java.lang.String name)
      get the current list of errors that occurred when evaluating "name" and clear the list
      java.lang.String getFormula(java.lang.String name)
      get a variable's current formula
      ThingReference getReference(java.lang.String name)
      get a variable's associated ThingReference
      Thing getThing(java.lang.String name)
      get a variable's current value
      void remove(java.lang.String name)
      remove a variable from the database
      void setReference(java.lang.String name, ThingReference tr)
      set a variable's ThingReference
      void setTextRef(java.lang.String name, ThingReference textRef)
      set a variable to auto-update its formula based on a Text object referenced by a ThingReference (useful for remote formula updates)
      void setThing(java.lang.String name, Thing t)
      set a variable's value directly
      void waitForFormula(java.lang.String name)
      blocks until this variable's formula is finished computing
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FormulaManager

        public FormulaManager(java.lang.String[] binOps,
                              int[] binPrec,
                              java.lang.String[] binMethods,
                              java.lang.String[] unaryOps,
                              int[] unaryPrec,
                              java.lang.String[] unaryMethods,
                              java.lang.String[] functions,
                              java.lang.String[] funcMethods,
                              int implicitPrec,
                              java.lang.String[] implicitMethods,
                              java.lang.String preParseMethod)
                       throws FormulaException
        construct a new FormulaManager object
        Throws:
        FormulaException
    • Method Detail

      • assignFormula

        public void assignFormula(java.lang.String name,
                                  java.lang.String formula)
                           throws VisADException
        assign a formula to a variable
        Throws:
        VisADException
      • waitForFormula

        public void waitForFormula(java.lang.String name)
                            throws VisADException
        blocks until this variable's formula is finished computing
        Throws:
        VisADException
      • setTextRef

        public void setTextRef(java.lang.String name,
                               ThingReference textRef)
                        throws VisADException,
                               java.rmi.RemoteException
        set a variable to auto-update its formula based on a Text object referenced by a ThingReference (useful for remote formula updates)
        Throws:
        VisADException
        java.rmi.RemoteException
      • getErrors

        public java.lang.String[] getErrors(java.lang.String name)
        get the current list of errors that occurred when evaluating "name" and clear the list
      • canBeRemoved

        public boolean canBeRemoved(java.lang.String name)
                             throws FormulaException
        check whether it is safe to remove a variable from the database
        Throws:
        FormulaException
      • exists

        public boolean exists(java.lang.String name)
        check whether a given variable is currently in the database
      • setThing

        public void setThing(java.lang.String name,
                             Thing t)
                      throws VisADException,
                             java.rmi.RemoteException
        set a variable's value directly
        Throws:
        VisADException
        java.rmi.RemoteException

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.