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 boolean
doesNotContainsVariable(GeneralFunction function, String varID)
Returns true if theVariable
specified is NOT found in theGeneralFunction
static Set<String>
getAllVariables(GeneralFunction input)
Returns a set containing the Strings of all variables used in this functionstatic String
getSingleVariable(GeneralFunction input)
If the input is in terms of only one variable, returns that variable's String; otherwise, returnsSettings.singleVariableDefault
static Predicate<GeneralFunction>
isVariable(String varID)
Returns aPredicate
ofGeneralFunction
describing whether a givenGeneralFunction
is an instance ofVariable
withvarID
equal to the specified String
-
Method Details
-
isVariable
Returns aPredicate
ofGeneralFunction
describing whether a givenGeneralFunction
is an instance ofVariable
withvarID
equal 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 theVariable
specified is NOT found in theGeneralFunction
- Parameters:
function
- TheGeneralFunction
that is being searchedvarID
- The String of the variable being searched for- Returns:
- true if the
Variable
specified is NOT found in theGeneralFunction
-