com.googlecode.sarasvati.rubric.env
Interface RubricEnv

All Superinterfaces:
PredicateEnv
All Known Implementing Classes:
DefaultRubricEnv

public interface RubricEnv
extends PredicateEnv

A RubricEnv does the actual evaluation of the predicates, date functions and date offset that are used in a Rubric program.

Author:
Paul Lorenz

Method Summary
 Date evalDateFunction(String dateFunction)
          Evaluates the named date function
 Date evalRelativeDate(Date date, boolean business, int offset, int unit)
          Calculates a date, offset by the given amount to the passed in date.
 String evalStringFunction(String stringFunction)
          Evaluates the given string function (function returning a string value).
 
Methods inherited from interface com.googlecode.sarasvati.rubric.env.PredicateEnv
evalPredicate
 

Method Detail

evalDateFunction

Date evalDateFunction(String dateFunction)
Evaluates the named date function

Parameters:
dateFunction - The name of the date function to evaluate
Returns:
The result of the date function.

evalStringFunction

String evalStringFunction(String stringFunction)
Evaluates the given string function (function returning a string value).

Parameters:
stringFunction - The name of the string function to evaluate
Returns:
The result of the string function

evalRelativeDate

Date evalRelativeDate(Date date,
                      boolean business,
                      int offset,
                      int unit)
Calculates a date, offset by the given amount to the passed in date. The units parameter will correspond to one of