public class Version extends ICalProperty
Defines the min/max iCalendar versions a consumer must support in order to successfully parse the iCalendar object.
Code sample:
ICalendar ical = new ICalendar(); //all ICalendar objects are given a VERSION property on creation ical.getVersion(); //"2.0" //get the default iCal version Version version = Version.v2_0(); ical.setVersion(version);
parameters| Constructor and Description |
|---|
Version(String version)
Creates a new version property.
|
Version(String minVersion,
String maxVersion)
Creates a new version property.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getMaxVersion()
Gets the maximum version that a consumer must support in order to
successfully parse the iCalendar object.
|
String |
getMinVersion()
Gets the minimum version that a consumer must support in order to
successfully parse the iCalendar object.
|
boolean |
isV2_0()
Determines if this version is the default iCalendar version.
|
void |
setMaxVersion(String maxVersion)
Sets the maximum version that a consumer must support in order to
successfully parse the iCalendar object.
|
void |
setMinVersion(String minVersion)
Sets the minimum version that a consumer must support in order to
successfully parse the iCalendar object.
|
static Version |
v2_0()
Creates a version property that is set to the default iCalendar version
(2.0).
|
protected void |
validate(List<ICalComponent> components,
List<Warning> warnings)
Checks the property for data consistency problems or deviations from the
spec.
|
addParameter, getParameter, getParameters, getParameters, removeParameter, setParameter, setParameter, setParameters, validatepublic Version(String version)
version - the version that a consumer must support in order to
successfully parse the iCalendar objectpublic Version(String minVersion, String maxVersion)
minVersion - the minimum version that a consumer must support in
order to successfully parse the iCalendar objectmaxVersion - the maximum version that a consumer must support in
order to successfully parse the iCalendar objectpublic static Version v2_0()
public boolean isV2_0()
public String getMinVersion()
public void setMinVersion(String minVersion)
minVersion - the minimum version or null to removepublic String getMaxVersion()
public void setMaxVersion(String maxVersion)
maxVersion - the maximum version (this field is required)protected void validate(List<ICalComponent> components, List<Warning> warnings)
ICalPropertyvalidate in class ICalPropertycomponents - the hierarchy of components that the property belongs
towarnings - the list to add the warnings toCopyright © 2013-2014 Michael Angstadt. All Rights Reserved.