org.deri.iris.builtins.date
Class DayFromDateTimeBuiltin

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

public class DayFromDateTimeBuiltin
extends FunctionalBuiltin

Represents the RIF built-in function func:day-from-dateTime.


Field Summary
 
Fields inherited from class org.deri.iris.builtins.AbstractBuiltin
EMPTY_TERM
 
Constructor Summary
DayFromDateTimeBuiltin(ITerm... terms)
          Constructor.
 
Method Summary
protected  ITerm computeResult(ITerm[] terms)
          Computes the result when all terms but the term at the last position are known.
 
Methods inherited from class org.deri.iris.builtins.FunctionalBuiltin
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

DayFromDateTimeBuiltin

public DayFromDateTimeBuiltin(ITerm... terms)
Constructor. Two terms must be passed to the constructor, otherwise an exception will be thrown.

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

computeResult

protected ITerm computeResult(ITerm[] terms)
Description copied from class: FunctionalBuiltin
Computes the result when all terms but the term at the last position are known.

Specified by:
computeResult in class FunctionalBuiltin
Parameters:
terms - The terms, where the terms at the last position is a variable representing the result.
Returns:
The computed term, or null if the operation is unsuccessful.