public class CalendarScale extends EnumProperty
Defines the calendar system that this iCalendar object uses for all its date values. If none is specified, then the calendar is assumed to be in "gregorian" format.
Code sample (creating):
ICalendar ical = new ICalendar();
ical.setCalendarScale(CalendarScale.gregorian());
ical = new ICalendar();
ical.setCalendarScale(new CalendarScale("another-calendar-system"));
Code sample (retrieving):
ICalendar ical = ...
CalendarScale calscale = ical.getCalendarscale();
if (calscale.isGregorian()) {
...
} else {
String value = calscale.getValue();
...
}
Examples:
//creating a new property
CalendarScale calscale = CalendarScale.gregorian();
if (calscale.isGregorian()) {
//its value is "GREGORIAN"
}
valueparameters| Constructor and Description |
|---|
CalendarScale(String value)
Creates a new calendar scale property.
|
| Modifier and Type | Method and Description |
|---|---|
protected Collection<String> |
getStandardValues()
Gets the list of acceptable values for this property.
|
static CalendarScale |
gregorian()
Creates a new property whose value is set to "gregorian".
|
boolean |
isGregorian()
Determines whether the property is set to "gregorian".
|
is, validategetValue, setValueaddParameter, getParameter, getParameters, getParameters, removeParameter, setParameter, setParameter, setParameters, validatepublic CalendarScale(String value)
value - the value of the property (e.g. "gregorian")public static CalendarScale gregorian()
public boolean isGregorian()
protected Collection<String> getStandardValues()
EnumPropertygetStandardValues in class EnumPropertyCopyright © 2013-2014 Michael Angstadt. All Rights Reserved.