Package tools
Class VariableTools
Object
VariableTools
public class VariableTools
extends Object
The
VariableTools class contains miscellaneous methods revolving around the Variable class.-
Method Summary
Modifier and Type Method Description static booleandoesNotContainsVariable(GeneralFunction function, String varID)Returns true if theVariablespecified is NOT found in theGeneralFunctionstatic Set<String>getAllVariables(GeneralFunction input)Returns a set containing the Strings of all variables used in this functionstatic StringgetSingleVariable(GeneralFunction input)If the input is in terms of only one variable, returns that variable's String; otherwise, returnsSettings.singleVariableDefaultstatic Predicate<GeneralFunction>isVariable(String varID)Returns aPredicateofGeneralFunctiondescribing whether a givenGeneralFunctionis an instance ofVariablewithvarIDequal to the specified String
-
Method Details
-
isVariable
Returns aPredicateofGeneralFunctiondescribing whether a givenGeneralFunctionis an instance ofVariablewithvarIDequal to the specified String- Parameters:
varID- the String of the variable to be checked for- Returns:
- the predicate described above
-
getAllVariables
Returns a set containing the Strings of all variables used in this function- Parameters:
input- the function to be tested- Returns:
- the set of variable Strings
-
getSingleVariable
If the input is in terms of only one variable, returns that variable's String; otherwise, returnsSettings.singleVariableDefault- Parameters:
input- the function to be read from- Returns:
- the variable String requested
-
doesNotContainsVariable
Returns true if theVariablespecified is NOT found in theGeneralFunction- Parameters:
function- TheGeneralFunctionthat is being searchedvarID- The String of the variable being searched for- Returns:
- true if the
Variablespecified is NOT found in theGeneralFunction
-