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
Term s 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
Variable s 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
Term s in the specified arrays. |
public static final Term[] EMPTY_ARRAY
public static Term[] copy(Term... input)
input
- Term
s to copypublic static void backtrack(Term[] terms)
Term
s in the specified array.terms
- Term
s to backtrackTerm.backtrack()
public static boolean unify(Term[] queryArgs, Term[] consequentArgs)
Term
s 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 consequentArgs
consequentArgs
- terms to unify with queryArgs
true
if the attempt to unify all corresponding terms was successfulpublic static Set<Variable> getAllVariablesInTerm(Term argument)
Variable
s contained in the specified term.argument
- the term to find variables forVariable
s contained in the specified term.public static int toInt(Term t)
t
- the term representing a Numeric
int
value represented by t
ProjogException
- 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 t
ProjogException
- if the specified Term
does not represent a term of type TermType.INTEGER
Copyright © 2024. All rights reserved.