|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RubricEnv
A RubricEnv does the actual evaluation of the predicates, date functions and date offset that are used in a Rubric program.
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 |
---|
Date evalDateFunction(String dateFunction)
dateFunction
- The name of the date function to evaluate
String evalStringFunction(String stringFunction)
stringFunction
- The name of the string function to evaluate
Date evalRelativeDate(Date date, boolean business, int offset, int unit)
Calendar.HOUR
Calendar.DATE
Calendar.WEEK_OF_YEAR
Calendar.add(int, int)
.
A more complicated implementation might take business days or other
business rules into account.
date
- The date to calculate the offset frombusiness
- Indicates whether the calculation should takes busines days/hours etc
into account.offset
- The amount of the offset.unit
- The unit of the offset. These map the units defined in Calendar
,
such as Calendar.DATE
or Calendar.WEEK_OF_YEAR
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |