Package tools

Class VariableTools

Object
VariableTools

public class VariableTools
extends Object
The VariableTools class contains miscellaneous methods revolving around the Variable class.
  • Method Details

    • isVariable

      public static Predicate<GeneralFunction> isVariable​(String varID)
      Returns a Predicate of GeneralFunction describing whether a given GeneralFunction is an instance of Variable with varID equal to the specified String
      Parameters:
      varID - the String of the variable to be checked for
      Returns:
      the predicate described above
    • getAllVariables

      public static Set<String> getAllVariables​(GeneralFunction input)
      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

      public static String getSingleVariable​(GeneralFunction input)
      If the input is in terms of only one variable, returns that variable's String; otherwise, returns Settings.singleVariableDefault
      Parameters:
      input - the function to be read from
      Returns:
      the variable String requested
    • doesNotContainsVariable

      public static boolean doesNotContainsVariable​(GeneralFunction function, String varID)
      Returns true if the Variable specified is NOT found in the GeneralFunction
      Parameters:
      function - The GeneralFunction that is being searched
      varID - The String of the variable being searched for
      Returns:
      true if the Variable specified is NOT found in the GeneralFunction