public class Daylight extends ICalProperty
parameters
Constructor and Description |
---|
Daylight()
Creates a daylight savings property which states that the timezone does
not observe daylight savings time.
|
Daylight(boolean daylight,
UtcOffset offset,
ICalDate start,
ICalDate end,
String standardName,
String daylightName)
Creates a daylight savings property.
|
Daylight(Daylight original)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
Daylight |
copy()
Creates a copy of this property object.
|
boolean |
equals(Object obj) |
String |
getDaylightName()
Gets the name of daylight savings time.
|
ICalDate |
getEnd()
Gets the end date of daylight savings time.
|
UtcOffset |
getOffset()
Gets the UTC offset of daylight savings time.
|
String |
getStandardName()
Gets the name for standard time.
|
ICalDate |
getStart()
Gets the start date of dayight savings time.
|
int |
hashCode() |
boolean |
isDaylight()
Gets whether this timezone observes daylight savings time.
|
void |
setDaylight(boolean daylight)
Sets whether this timezone observes daylight savings time.
|
void |
setDaylightName(String name)
Sets the name of daylight savings time.
|
void |
setEnd(ICalDate end)
Sets the end date of daylight savings time.
|
void |
setOffset(UtcOffset offset)
Sets the UTC offset of daylight savings time.
|
void |
setStandardName(String name)
Sets the name for standard time.
|
void |
setStart(ICalDate start)
Sets the start date of dayight savings time.
|
protected Map<String,Object> |
toStringValues()
Gets string representations of the class's fields for the
ICalProperty.toString() method. |
protected void |
validate(List<ICalComponent> components,
ICalVersion version,
List<ValidationWarning> warnings)
Checks the property for data consistency problems or deviations from the
specifications.
|
addParameter, getParameter, getParameters, getParameters, removeParameter, setParameter, setParameter, setParameters, toString, validate
public Daylight()
public Daylight(boolean daylight, UtcOffset offset, ICalDate start, ICalDate end, String standardName, String daylightName)
daylight
- true if the timezone observes daylight savings time,
false if notoffset
- the UTC offset of daylight savings timestart
- the start date of daylight savings timeend
- the end date of daylight savings timestandardName
- the timezone's name for standard time (e.g. "EST")daylightName
- the timezone's name for daylight savings time (e.g.
"EDT")public boolean isDaylight()
public void setDaylight(boolean daylight)
daylight
- true if it observes daylight savings time, false if notpublic UtcOffset getOffset()
public void setOffset(UtcOffset offset)
offset
- the UTC offsetpublic ICalDate getStart()
public void setStart(ICalDate start)
start
- the start datepublic void setEnd(ICalDate end)
end
- the end datepublic String getStandardName()
public void setStandardName(String name)
name
- the name (e.g. "EST")public String getDaylightName()
public void setDaylightName(String name)
name
- the name (e.g. "EDT")protected void validate(List<ICalComponent> components, ICalVersion version, List<ValidationWarning> warnings)
ICalProperty
Checks the property for data consistency problems or deviations from the specifications.
This method should be overridden by child classes that wish to provide validation logic. The default implementation of this method does nothing.
validate
in class ICalProperty
components
- the hierarchy of components that the property belongs
toversion
- the version to validate againstwarnings
- the list to add the warnings toprotected Map<String,Object> toStringValues()
ICalProperty
Gets string representations of the class's fields for the
ICalProperty.toString()
method.
Meant to be overridden by child classes. The default implementation returns an empty map.
toStringValues
in class ICalProperty
public Daylight copy()
ICalProperty
Creates a copy of this property object.
The default implementation of this method uses reflection to look for a copy constructor. Child classes SHOULD override this method to avoid the performance overhead involved in using reflection.
The child class's copy constructor, if present, MUST invoke the
ICalProperty.ICalProperty(ICalProperty)
super constructor to ensure that the
parameters are also copied.
This method MUST be overridden by the child class if the child class does
not have a copy constructor. Otherwise, an
UnsupportedOperationException
will be thrown when an attempt is
made to copy the property (such as in the
ICalendar class's copy constructor
).
copy
in class ICalProperty
public int hashCode()
hashCode
in class ICalProperty
public boolean equals(Object obj)
equals
in class ICalProperty
Copyright © 2013-2017 Michael Angstadt. All Rights Reserved.