org.deri.iris.builtins
Class EqualBuiltin
java.lang.Object
org.deri.iris.builtins.AbstractBuiltin
org.deri.iris.builtins.ArithmeticBuiltin
org.deri.iris.builtins.EqualBuiltin
- All Implemented Interfaces:
- Comparable<IAtom>, IAtom, IBuiltinAtom
- Direct Known Subclasses:
- BooleanEqualBuiltin, DateEqualBuiltin, DateTimeEqualBuiltin, DurationEqualBuiltin, NumericEqualBuiltin, TimeEqualBuiltin, XMLLiteralEqualBuiltin
public class EqualBuiltin
- extends ArithmeticBuiltin
Built-in to either: a) compare two terms for equality, OR b) assign a
constant expression to a variable
|
Method Summary |
protected ITerm |
computeMissingTerm(int missingTermIndex,
ITerm[] terms)
Compute the missing term when the other two are known. |
EqualBuiltin
protected EqualBuiltin(IPredicate predicate,
ITerm... terms)
- Construct a new EqualBuiltin for the specific predicate and terms.
- Parameters:
predicate - The predicate of the built-in.terms - The terms.
- Throws:
NullPointerException - If the predicate or one of the terms is
null.
IllegalArgumentException - If the length of the terms and the arity
of the predicate do not match.
EqualBuiltin
public EqualBuiltin(ITerm... t)
- Constructor.
- Parameters:
terms - The terms, must be two of these
- Throws:
NullPointerException - If the predicate or one of the terms is
null.
IllegalArgumentException - If the length of the terms and the arity
of the predicate do not match.
computeMissingTerm
protected ITerm computeMissingTerm(int missingTermIndex,
ITerm[] terms)
- Description copied from class:
ArithmeticBuiltin
- Compute the missing term when the other two are known.
- Specified by:
computeMissingTerm in class ArithmeticBuiltin
terms - The collection of all terms.
- Returns:
- The computed value.