|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectezvcard.property.VCardProperty
ezvcard.property.DateOrTimeProperty
public class DateOrTimeProperty
Represents a property whose value contains a date and/or a time (for example,
Birthday
).
Field Summary |
---|
Fields inherited from class ezvcard.property.VCardProperty |
---|
group, parameters |
Constructor Summary | |
---|---|
DateOrTimeProperty(Date date)
Creates a date-and-or-time property. |
|
DateOrTimeProperty(Date date,
boolean hasTime)
Creates a date-and-or-time property. |
|
DateOrTimeProperty(PartialDate partialDate)
Creates a date-and-or-time property. |
|
DateOrTimeProperty(String text)
Creates a date-and-or-time property. |
Method Summary | |
---|---|
protected void |
_validate(List<Warning> warnings,
VCardVersion version,
VCard vcard)
Checks the property for data consistency problems or deviations from the spec. |
String |
getAltId()
Gets the property's ALTID parameter. |
Calscale |
getCalscale()
Gets the type of calendar that is used for a date or date-time property value. |
Date |
getDate()
Gets the date value. |
PartialDate |
getPartialDate()
Gets the reduced accuracy or truncated date. |
String |
getText()
Gets the text value of this type. |
boolean |
hasTime()
Determines whether the "date" or "partialDate" fields have a time component. |
void |
setAltId(String altId)
Sets the property's ALTID parameter. |
void |
setCalscale(Calscale calscale)
Sets the type of calendar that is used for a date or date-time property value. |
void |
setDate(Date date,
boolean hasTime)
Sets the value of this property to a complete date. |
void |
setPartialDate(PartialDate partialDate)
Sets the value of this property to a reduced accuracy or truncated date. |
void |
setText(String text)
Sets the value of this property to a text string. |
Methods inherited from class ezvcard.property.VCardProperty |
---|
_supportedVersions, addParameter, compareTo, getGroup, getParameter, getParameters, getParameters, getSupportedVersions, removeParameter, setGroup, setParameter, setParameters, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DateOrTimeProperty(Date date)
date
- the date valuepublic DateOrTimeProperty(Date date, boolean hasTime)
date
- the date valuehasTime
- true to include the date's time component, false if it's
strictly a datepublic DateOrTimeProperty(PartialDate partialDate)
partialDate
- the partial date value (vCard 4.0 only)public DateOrTimeProperty(String text)
text
- the text value (vCard 4.0 only)Method Detail |
---|
public Date getDate()
public void setDate(Date date, boolean hasTime)
date
- the datehasTime
- true to include the date's time component, false if it's
strictly a datepublic PartialDate getPartialDate()
public void setPartialDate(PartialDate partialDate)
Sets the value of this property to a reduced accuracy or truncated date. This is only supported by vCard 4.0.
Birthday bday = new Birthday(); bday.setPartialDate(PartialDate.date(null, 4, 20)); //April 20
partialDate
- the reduced accuracy or truncated datepublic String getText()
public void setText(String text)
text
- the text valuepublic boolean hasTime()
public Calscale getCalscale()
Gets the type of calendar that is used for a date or date-time property value.
Supported versions: 4.0
VCardParameters.getCalscale()
public void setCalscale(Calscale calscale)
Sets the type of calendar that is used for a date or date-time property value.
Supported versions: 4.0
calscale
- the type of calendar or null to removeVCardParameters.setCalscale(ezvcard.parameter.Calscale)
public String getAltId()
HasAltId
Supported versions: 4.0
getAltId
in interface HasAltId
VCardParameters.getAltId()
public void setAltId(String altId)
HasAltId
Supported versions: 4.0
setAltId
in interface HasAltId
altId
- the ALTID or null to removeVCardParameters.setAltId(java.lang.String)
protected void _validate(List<Warning> warnings, VCardVersion version, VCard vcard)
VCardProperty
_validate
in class VCardProperty
warnings
- the list to add the warnings toversion
- the version to check the property againstvcard
- the vCard this property belongs to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |