org.deri.iris.builtins.date
Class SubtractDayTimeDurationFromTimeBuiltin

java.lang.Object
  extended by org.deri.iris.builtins.AbstractBuiltin
      extended by org.deri.iris.builtins.ArithmeticBuiltin
          extended by org.deri.iris.builtins.SubtractBuiltin
              extended by org.deri.iris.builtins.date.SubtractDayTimeDurationFromTimeBuiltin
All Implemented Interfaces:
Comparable<IAtom>, IAtom, IBuiltinAtom

public class SubtractDayTimeDurationFromTimeBuiltin
extends SubtractBuiltin

Represents the RIF built-in function func:subtract-dayTimeDuration-from-time.


Field Summary
 
Fields inherited from class org.deri.iris.builtins.AbstractBuiltin
EMPTY_TERM
 
Constructor Summary
SubtractDayTimeDurationFromTimeBuiltin(ITerm... terms)
          Creates the built-in for the specified terms.
 
Method Summary
protected  ITerm computeMissingTerm(int missingTermIndex, ITerm[] terms)
          Compute the missing term when the other two are known.
 
Methods inherited from class org.deri.iris.builtins.ArithmeticBuiltin
evaluateTerms, maxUnknownVariables, testForEquality
 
Methods inherited from class org.deri.iris.builtins.AbstractBuiltin
compareTo, equals, evaluate, getPredicate, getTuple, hashCode, isBuiltin, isGround, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SubtractDayTimeDurationFromTimeBuiltin

public SubtractDayTimeDurationFromTimeBuiltin(ITerm... terms)
Creates the built-in for the specified terms.

Parameters:
terms - The terms.
Throws:
NullPointerException - If one of the terms is null.
IllegalArgumentException - If the number of terms submitted is not 3.
Method Detail

computeMissingTerm

protected ITerm computeMissingTerm(int missingTermIndex,
                                   ITerm[] terms)
Description copied from class: ArithmeticBuiltin
Compute the missing term when the other two are known.

Overrides:
computeMissingTerm in class SubtractBuiltin
terms - The collection of all terms.
Returns:
The computed value.