Package ffx.utilities

Class FFXBinding

java.lang.Object
ffx.utilities.FFXBinding

public class FFXBinding extends Object
The FFXBinding binds variable names to their instances for an FFX Command.
Author:
Michael J. Schnieders
  • Constructor Details

    • FFXBinding

      public FFXBinding()

      Constructor for FFXContext.

    • FFXBinding

      public FFXBinding(Map<String,Object> variables)

      Constructor for FFXContext.

      Parameters:
      variables - a Map object
    • FFXBinding

      public FFXBinding(String[] args)
      A helper constructor used in main(String[]) method calls
      Parameters:
      args - are the command line arguments from a main()
  • Method Details

    • getVariable

      public Object getVariable(String name)

      getVariable.

      Parameters:
      name - the name of the variable to lookup
      Returns:
      the variable value
    • setVariable

      public void setVariable(String name, Object value)
      Sets the value of the given variable
      Parameters:
      name - the name of the variable to set
      value - the new value for the given variable
    • removeVariable

      public void removeVariable(String name)
      Remove the variable with the specified name.
      Parameters:
      name - the name of the variable to remove
    • hasVariable

      public boolean hasVariable(String name)
      Simple check for whether the context contains a particular variable or not.
      Parameters:
      name - the name of the variable to check for
      Returns:
      a boolean
    • getVariables

      public Map<String,Object> getVariables()
      Get the Map of all variables. This returns a reference and not a copy.
      Returns:
      a Map of the variables.
    • setVariables

      public void setVariables(Map<String,Object> variables)
      Set the Map of all variables. The reference is kept without making a copy.
      Parameters:
      variables - a Map of the variables.