| java.lang.Object org.jfree.date.AnnualDateRule org.jfree.date.RelativeDayOfWeekRule
RelativeDayOfWeekRule | public class RelativeDayOfWeekRule extends AnnualDateRule (Code) | | An annual date rule that returns a date for each year based on (a) a
reference rule; (b) a day of the week; and (c) a selection parameter
(SerialDate.PRECEDING, SerialDate.NEAREST, SerialDate.FOLLOWING).
For example, Good Friday can be specified as 'the Friday PRECEDING Easter
Sunday'.
author: David Gilbert |
Method Summary | |
public Object | clone() Creates a clone of this rule. | public SerialDate | getDate(int year) Returns the date generated by this rule, for the specified year.
Parameters: year - the year (1900 <= year <= 9999). | public int | getDayOfWeek() Returns the day-of-the-week for this rule. | public int | getRelative() Returns the 'relative' attribute, that determines *which*
day-of-the-week we are interested in (SerialDate.PRECEDING,
SerialDate.NEAREST or SerialDate.FOLLOWING). | public AnnualDateRule | getSubrule() Returns the sub-rule (also called the reference rule). | public void | setDayOfWeek(int dayOfWeek) Sets the day-of-the-week for this rule. | public void | setRelative(int relative) Sets the 'relative' attribute (SerialDate.PRECEDING, SerialDate.NEAREST,
SerialDate.FOLLOWING). | public void | setSubrule(AnnualDateRule subrule) Sets the sub-rule. |
RelativeDayOfWeekRule | public RelativeDayOfWeekRule()(Code) | | Default constructor - builds a rule for the Monday following 1 January.
|
RelativeDayOfWeekRule | public RelativeDayOfWeekRule(AnnualDateRule subrule, int dayOfWeek, int relative)(Code) | | Standard constructor - builds rule based on the supplied sub-rule.
Parameters: subrule - the rule that determines the reference date. Parameters: dayOfWeek - the day-of-the-week relative to the reference date. Parameters: relative - indicates *which* day-of-the-week (preceding, nearest or following). |
getDate | public SerialDate getDate(int year)(Code) | | Returns the date generated by this rule, for the specified year.
Parameters: year - the year (1900 <= year <= 9999). The date generated by the rule for the given year (possibly null ). |
getDayOfWeek | public int getDayOfWeek()(Code) | | Returns the day-of-the-week for this rule.
the day-of-the-week for this rule. |
getRelative | public int getRelative()(Code) | | Returns the 'relative' attribute, that determines *which*
day-of-the-week we are interested in (SerialDate.PRECEDING,
SerialDate.NEAREST or SerialDate.FOLLOWING).
The 'relative' attribute. |
getSubrule | public AnnualDateRule getSubrule()(Code) | | Returns the sub-rule (also called the reference rule).
The annual date rule that determines the reference date for this rule. |
setDayOfWeek | public void setDayOfWeek(int dayOfWeek)(Code) | | Sets the day-of-the-week for this rule.
Parameters: dayOfWeek - the day-of-the-week (SerialDate.MONDAY, SerialDate.TUESDAY, and so on). |
setRelative | public void setRelative(int relative)(Code) | | Sets the 'relative' attribute (SerialDate.PRECEDING, SerialDate.NEAREST,
SerialDate.FOLLOWING).
Parameters: relative - determines *which* day-of-the-week is selected by this rule. |
setSubrule | public void setSubrule(AnnualDateRule subrule)(Code) | | Sets the sub-rule.
Parameters: subrule - the annual date rule that determines the reference date for this rule. |
|
|