org.deri.iris.builtins
Class DivideBuiltin
java.lang.Object
org.deri.iris.builtins.AbstractBuiltin
org.deri.iris.builtins.ArithmeticBuiltin
org.deri.iris.builtins.DivideBuiltin
- All Implemented Interfaces:
- Comparable<IAtom>, IAtom, IBuiltinAtom
- Direct Known Subclasses:
- DayTimeDurationDivideBuiltin, DayTimeDurationDivideByDayTimeDurationBuiltin, NumericDivideBuiltin, NumericIntegerDivideBuiltin, YearMonthDurationDivideBuiltin, YearMonthDurationDivideByYearMonthDurationBuiltin
public class DivideBuiltin
- extends ArithmeticBuiltin
Represents a multiply operation. In at the evaluation time there must be only one
variable be left for computation, otherwise an exception will be thrown.
$Id: DivideBuiltin.java,v 1.15 2007-10-12 12:40:58 bazbishop237 Exp $
- Version:
- $Revision: 1.15 $
- Author:
- Richard P??ttler, richard dot poettler at deri dot org
|
Method Summary |
protected ITerm |
computeMissingTerm(int missingTermIndex,
ITerm[] terms)
Compute the missing term when the other two are known. |
DivideBuiltin
protected DivideBuiltin(IPredicate predicate,
ITerm... terms)
- Construct a new DivideBuiltin 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.
DivideBuiltin
public DivideBuiltin(ITerm... t)
- Constructs a builtin. Three terms must be passed to the constructor,
otherwise an exception will be thrown.
- Parameters:
t - 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.
computeMissingTerm
protected ITerm computeMissingTerm(int missingTermIndex,
ITerm[] terms)
throws EvaluationException
- 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.
- Throws:
EvaluationException