org.deri.iris.builtins
Class LessBuiltin

java.lang.Object
  extended by org.deri.iris.builtins.AbstractBuiltin
      extended by org.deri.iris.builtins.BooleanBuiltin
          extended by org.deri.iris.builtins.LessBuiltin
All Implemented Interfaces:
Comparable<IAtom>, IAtom, IBuiltinAtom
Direct Known Subclasses:
BooleanLessBuiltin, DateLessBuiltin, DateTimeLessBuiltin, DayTimeDurationLessBuiltin, NumericLessBuiltin, TimeLessBuiltin, YearMonthDurationLessBuiltin

public class LessBuiltin
extends BooleanBuiltin

Built-in to compare two terms.


Field Summary
 
Fields inherited from class org.deri.iris.builtins.AbstractBuiltin
EMPTY_TERM
 
Constructor Summary
protected LessBuiltin(IPredicate predicate, ITerm... terms)
          Construct a new LessBuiltin for the specific predicate and terms.
  LessBuiltin(ITerm... terms)
          Constructor.
 
Method Summary
protected  boolean computeResult(ITerm[] terms)
          Compute the result of the comparison.
 
Methods inherited from class org.deri.iris.builtins.BooleanBuiltin
evaluateTerms
 
Methods inherited from class org.deri.iris.builtins.AbstractBuiltin
compareTo, equals, evaluate, getPredicate, getTuple, hashCode, isBuiltin, isGround, maxUnknownVariables, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LessBuiltin

protected LessBuiltin(IPredicate predicate,
                      ITerm... terms)
Construct a new LessBuiltin 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.

LessBuiltin

public LessBuiltin(ITerm... terms)
Constructor.

Parameters:
terms - the terms, must be of length 2
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.
Method Detail

computeResult

protected boolean computeResult(ITerm[] terms)
Description copied from class: BooleanBuiltin
Compute the result of the comparison.

Specified by:
computeResult in class BooleanBuiltin
Parameters:
terms - The terms
Returns:
The result of the comparison.