public class StaticCalendarKeyword extends CalendarKeyword implements java.lang.Iterable<DateTime>
Constructor and Description |
---|
StaticCalendarKeyword(UC4ObjectName name,
DateTime from,
DateTime to)
Constructs a new
StaticCalendarKeyword using the specified name and date range. |
Modifier and Type | Method and Description |
---|---|
void |
add(DateTime date)
Adds a new date to this static calendar keyword.
|
DateTime |
getValidFrom()
Returns the start date of the validity period.
|
DateTime |
getValidTo()
Returns the end date of the validity period.
|
boolean |
isGroup()
Returns
true if this is a group keyword. |
boolean |
isMonthly()
Returns
true if this is a monthly keyword. |
boolean |
isRoll()
Returns
true if this is a roll keyword. |
boolean |
isStatic()
Returns
true if this is a static keyword. |
boolean |
isWeekly()
Returns
true if this is a weekly keyword. |
boolean |
isYearly()
Returns
true if this is a yearly keyword. |
java.util.Iterator<DateTime> |
iterator()
Returns an iterator over
DateTime . |
boolean |
remove(DateTime date)
Removes the specified date from this static calendar keyword.
|
void |
setValidFrom(DateTime validFrom)
Sets the start date of the validity period.
|
void |
setValidTo(DateTime validTo)
Sets the end date of the validity period.
|
containsDate, equals, getErrorMessageNumber, getErrorText, getName, hashCode, setName, toString
public StaticCalendarKeyword(UC4ObjectName name, DateTime from, DateTime to)
StaticCalendarKeyword
using the specified name and date range.name
- Name of the Calendar Keywordfrom
- Start date where the calendar keyword is validto
- End date until the calendar keyword is validpublic java.util.Iterator<DateTime> iterator()
DateTime
.
This iterator can be used to read or delete dates in this static calendar keyword.iterator
in interface java.lang.Iterable<DateTime>
public void add(DateTime date)
date
- DateTime containing the Date that should be addedpublic boolean remove(DateTime date)
date
- DateTime which should be removedpublic DateTime getValidFrom()
public void setValidFrom(DateTime validFrom)
validFrom
- DateTime containing the start date of the validity periodpublic DateTime getValidTo()
public void setValidTo(DateTime validTo)
validTo
- DateTime containing the end date of the validity periodpublic boolean isStatic()
CalendarKeyword
true
if this is a static keyword.isStatic
in class CalendarKeyword
public boolean isWeekly()
CalendarKeyword
true
if this is a weekly keyword.isWeekly
in class CalendarKeyword
public boolean isMonthly()
CalendarKeyword
true
if this is a monthly keyword.isMonthly
in class CalendarKeyword
public boolean isYearly()
CalendarKeyword
true
if this is a yearly keyword.isYearly
in class CalendarKeyword
public boolean isGroup()
CalendarKeyword
true
if this is a group keyword.isGroup
in class CalendarKeyword
public boolean isRoll()
CalendarKeyword
true
if this is a roll keyword.isRoll
in class CalendarKeyword