Package org.jreliability.booleanfunction
Class TermUtils
- java.lang.Object
-
- org.jreliability.booleanfunction.TermUtils
-
public class TermUtils extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
TermUtils.ParseString
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Term
getTermFromString(java.lang.String string)
Derives aTerm
from a givenString
.static <T> java.util.Set<T>
getVariables(Term term)
Returns the variables included in aTerm
.static <T> void
getVariables(Term term, java.util.Set<T> set)
Adds the variables included in aTerm
to a given set of variables.protected static Term
parse(java.lang.Object object)
protected static java.lang.Object
toObject(TermUtils.ParseString string)
Transforms a givenString
to a helperObject
that representsTerm
s asList
s of helperObject
s and variables asString
s.
-
-
-
Method Detail
-
getVariables
public static <T> java.util.Set<T> getVariables(Term term)
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
public static <T> void getVariables(Term term, java.util.Set<T> set)
Adds the variables included in aTerm
to a given set of variables.- Type Parameters:
T
- the type of the variables- Parameters:
term
- the termset
- the set of variables
-
getTermFromString
public static Term getTermFromString(java.lang.String string)
Derives aTerm
from a givenString
.- Parameters:
string
- the string encoding the term- Returns:
- a term from a given string
-
parse
protected static Term parse(java.lang.Object object)
Parses aTerm
from a given helperObject
that has been derived from the originalString
encoding theTerm
.- Parameters:
object
- the helper object- Returns:
- a term from a given helper object
-
toObject
protected static java.lang.Object toObject(TermUtils.ParseString string)
Transforms a givenString
to a helperObject
that representsTerm
s asList
s of helperObject
s and variables asString
s.- Parameters:
string
- the string encoding theTerm
- Returns:
- a helper object to parse the given string
-
-