Package ffx.utilities
Class FFXBinding
java.lang.Object
ffx.utilities.FFXBinding
The FFXBinding binds variable names to their instances for an FFX Command.
- Author:
- Michael J. Schnieders
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for FFXContext.FFXBinding
(String[] args) A helper constructor used in main(String[]) method callsFFXBinding
(Map<String, Object> variables) Constructor for FFXContext. -
Method Summary
Modifier and TypeMethodDescriptiongetVariable
(String name) getVariable.Get the Map of all variables.boolean
hasVariable
(String name) Simple check for whether the context contains a particular variable or not.void
removeVariable
(String name) Remove the variable with the specified name.void
setVariable
(String name, Object value) Sets the value of the given variablevoid
setVariables
(Map<String, Object> variables) Set the Map of all variables.
-
Constructor Details
-
FFXBinding
public FFXBinding()Constructor for FFXContext.
-
FFXBinding
Constructor for FFXContext.
- Parameters:
variables
- aMap
object
-
FFXBinding
A helper constructor used in main(String[]) method calls- Parameters:
args
- are the command line arguments from a main()
-
-
Method Details
-
getVariable
getVariable.
- Parameters:
name
- the name of the variable to lookup- Returns:
- the variable value
-
setVariable
Sets the value of the given variable- Parameters:
name
- the name of the variable to setvalue
- the new value for the given variable
-
removeVariable
Remove the variable with the specified name.- Parameters:
name
- the name of the variable to remove
-
hasVariable
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
Get the Map of all variables. This returns a reference and not a copy.- Returns:
- a Map of the variables.
-
setVariables
Set the Map of all variables. The reference is kept without making a copy.- Parameters:
variables
- a Map of the variables.
-