public class TimeWindow extends Object implements ISelfValidate
Constructor and Description |
---|
TimeWindow()
Initializes a new instance of the "TimeWindow" class.
|
TimeWindow(Date startTime,
Date endTime)
Initializes a new instance of the "TimeWindow" class.
|
Modifier and Type | Method and Description |
---|---|
long |
getDuration()
Gets the duration.
|
Date |
getEndTime()
Gets the end time.
|
Date |
getStartTime()
Gets the start time.
|
void |
loadFromXml(EwsServiceXmlReader reader)
Loads from XML.
|
void |
setEndTime(Date endTime)
Sets the end time.
|
void |
setStartTime(Date startTime)
Sets the start time.
|
void |
validate()
Validates this instance.
|
void |
writeToXml(EwsServiceXmlWriter writer,
String xmlElementName)
Writes to XML.
|
protected void |
writeToXmlUnscopedDatesOnly(EwsServiceXmlWriter writer,
String xmlElementName)
Writes to XML without scoping the dates and without emitting times.
|
public TimeWindow()
public TimeWindow(Date startTime, Date endTime)
startTime
- the start timeendTime
- the end timepublic Date getStartTime()
public void setStartTime(Date startTime)
startTime
- the new start timepublic Date getEndTime()
public void setEndTime(Date endTime)
endTime
- the new end timepublic void loadFromXml(EwsServiceXmlReader reader) throws Exception
reader
- the readerException
- the exceptionprotected void writeToXmlUnscopedDatesOnly(EwsServiceXmlWriter writer, String xmlElementName) throws XMLStreamException, ServiceXmlSerializationException
writer
- the writerxmlElementName
- the xml element nameXMLStreamException
- the XML stream exceptionServiceXmlSerializationException
- the service xml serialization exceptionpublic void writeToXml(EwsServiceXmlWriter writer, String xmlElementName) throws XMLStreamException, ServiceXmlSerializationException
writer
- the writerxmlElementName
- the xml element nameXMLStreamException
- the XML stream exceptionServiceXmlSerializationException
- the service xml serialization exceptionpublic long getDuration()
public void validate()
validate
in interface ISelfValidate
Copyright © 2012–2015 Microsoft. All rights reserved.