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" }
value
parameters
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, validate
getValue, setValue
addParameter, getParameter, getParameters, getParameters, removeParameter, setParameter, setParameter, setParameters, validate
public CalendarScale(String value)
value
- the value of the property (e.g. "gregorian")public static CalendarScale gregorian()
public boolean isGregorian()
protected Collection<String> getStandardValues()
EnumProperty
getStandardValues
in class EnumProperty
Copyright © 2013-2014 Michael Angstadt. All Rights Reserved.