| Modifier and Type | Field and Description |
|---|---|
static Term[] |
EMPTY_ARRAY
A
Term array of length 0. |
| Modifier and Type | Method and Description |
|---|---|
static void |
assertType(Term t,
TermType type) |
static void |
backtrack(Term[] terms)
Backtracks all
Terms in the specified array. |
static Numeric |
castToNumeric(Term t)
|
static Term[] |
copy(Term... input)
Returns copies of the specified {link Term}s
|
static Set<Variable> |
getAllVariablesInTerm(Term argument)
Returns all
Variables contained in the specified term. |
static String |
getAtomName(Term t)
|
static boolean |
termsEqual(Term a,
Term b) |
static int |
toInt(Term t)
|
static long |
toLong(ArithmeticOperators operators,
Term t)
Return the long value represented by the specified term.
|
static boolean |
unify(Term[] queryArgs,
Term[] consequentArgs)
Attempts to unify all corresponding
Terms in the specified arrays. |
public static final Term[] EMPTY_ARRAY
public static Term[] copy(Term... input)
input - Terms to copypublic static void backtrack(Term[] terms)
Terms in the specified array.terms - Terms to backtrackTerm.backtrack()public static boolean unify(Term[] queryArgs, Term[] consequentArgs)
Terms in the specified arrays.
Note: If the attempt to unify the corresponding terms is unsuccessful only the terms in queryArgs will
get backtracked.
queryArgs - terms to unify with consequentArgsconsequentArgs - terms to unify with queryArgstrue if the attempt to unify all corresponding terms was successfulpublic static Set<Variable> getAllVariablesInTerm(Term argument)
Variables contained in the specified term.argument - the term to find variables forVariables contained in the specified term.public static int toInt(Term t)
t - the term representing a Numericint value represented by tProjogException - if the specified Term cannot be represented as an int.public static long toLong(ArithmeticOperators operators, Term t)
t - the term representing a long valuelong value represented by tProjogException - if the specified Term does not represent a term of type TermType.INTEGERCopyright © 2024. All rights reserved.