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(ICalVersion version)
Gets the list of acceptable values for this property.
|
protected Collection<ICalVersion> |
getValueSupportedVersions()
Gets the iCalendar versions that this property's value is supported in.
|
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, getValue, 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(ICalVersion version)
EnumPropertygetStandardValues in class EnumPropertyversion - the versionprotected Collection<ICalVersion> getValueSupportedVersions()
EnumPropertygetValueSupportedVersions in class EnumPropertyCopyright © 2013-2015 Michael Angstadt. All Rights Reserved.