Package org.jreliability.booleanfunction
Class TermUtils
java.lang.Object
org.jreliability.booleanfunction.TermUtils
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class -
Method Summary
Modifier and TypeMethodDescriptionstatic TermgetTermFromString(String string) static <T> Set<T> getVariables(Term term) Returns the variables included in aTerm.static <T> voidgetVariables(Term term, Set<T> set) Adds the variables included in aTermto a given set of variables.protected static Termprotected static ObjecttoObject(TermUtils.ParseString string)
-
Method Details
-
getVariables
Returns the variables included in aTerm.- Type Parameters:
T- the type of the variables- Parameters:
term- the term- Returns:
- the variables included in the term
-
getVariables
Adds the variables included in aTermto a given set of variables.- Type Parameters:
T- the type of the variables- Parameters:
term- the termset- the set of variables
-
getTermFromString
- Parameters:
string- the string encoding the term- Returns:
- a term from a given string
-
parse
Parses aTermfrom a given helperObjectthat has been derived from the originalStringencoding theTerm.- Parameters:
object- the helper object- Returns:
- a term from a given helper object
-
toObject
Transforms a givenStringto a helperObjectthat representsTerms asLists of helperObjects and variables asStrings.- Parameters:
string- the string encoding theTerm- Returns:
- a helper object to parse the given string
-