microsoft.exchange.webservices.data
Class DayOfTheWeekCollection

java.lang.Object
  extended by microsoft.exchange.webservices.data.ComplexProperty
      extended by microsoft.exchange.webservices.data.DayOfTheWeekCollection
All Implemented Interfaces:
java.lang.Iterable<DayOfTheWeek>

public final class DayOfTheWeekCollection
extends ComplexProperty
implements java.lang.Iterable<DayOfTheWeek>

Represents a collection of DayOfTheWeek values.


Constructor Summary
protected DayOfTheWeekCollection()
          Initializes a new instance of the class.
 
Method Summary
 void add(DayOfTheWeek dayOfTheWeek)
          Adds a day to the collection if it is not already present.
 void addRange(java.util.Iterator<DayOfTheWeek> daysOfTheWeek)
          Adds multiple days to the collection if they are not already present.
 void clear()
          Clears the collection.
 int getCount()
          Gets the number of days in the collection.
 DayOfTheWeek getWeekCollectionAtIndex(int index)
          Gets the DayOfTheWeek at a specific index in the collection.
 java.util.Iterator<DayOfTheWeek> iterator()
           
protected  void loadFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader, java.lang.String xmlElementName)
          Loads from XML.
 boolean remove(DayOfTheWeek dayOfTheWeek)
          Remove a specific day from the collection.
 void removeAt(int index)
          Removes the day at a specific index.
 java.lang.String toString()
          Builds string representation of the collection.
protected  void writeToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer, java.lang.String xmlElementName)
          * Gets the request version.
 
Methods inherited from class microsoft.exchange.webservices.data.ComplexProperty
addOnChangeEvent, canSetFieldValue, changed, clearChangeEvents, clearChangeLog, func, getNamespace, internalValidate, loadFromXml, readAttributesFromXml, readTextValueFromXml, removeChangeEvent, setNamespace, tryReadElementFromXml, tryReadElementFromXmlToPatch, updateFromXml, updateFromXml, validate, writeAttributesToXml, writeElementsToXml, writeToXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DayOfTheWeekCollection

protected DayOfTheWeekCollection()
Initializes a new instance of the class.

Method Detail

loadFromXml

protected void loadFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader,
                           java.lang.String xmlElementName)
                    throws java.lang.Exception
Loads from XML.

Overrides:
loadFromXml in class ComplexProperty
Parameters:
reader - The reader.
xmlElementName - Name of the XML element.
Throws:
java.lang.Exception - the exception

writeToXml

protected void writeToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer,
                          java.lang.String xmlElementName)
                   throws javax.xml.stream.XMLStreamException,
                          ServiceXmlSerializationException
* Gets the request version.

Overrides:
writeToXml in class ComplexProperty
Parameters:
writer - the writer
xmlElementName - the xml element name
Throws:
javax.xml.stream.XMLStreamException - the xML stream exception
ServiceXmlSerializationException - the service xml serialization exception

toString

public java.lang.String toString()
Builds string representation of the collection.

Overrides:
toString in class java.lang.Object
Returns:
A comma-delimited string representing the collection.

add

public void add(DayOfTheWeek dayOfTheWeek)
Adds a day to the collection if it is not already present.

Parameters:
dayOfTheWeek - The day to add.

addRange

public void addRange(java.util.Iterator<DayOfTheWeek> daysOfTheWeek)
Adds multiple days to the collection if they are not already present.

Parameters:
daysOfTheWeek - The days to add.

clear

public void clear()
Clears the collection.


remove

public boolean remove(DayOfTheWeek dayOfTheWeek)
Remove a specific day from the collection.

Parameters:
dayOfTheWeek - the day of the week
Returns:
True if the day was removed from the collection, false otherwise.

removeAt

public void removeAt(int index)
              throws ArgumentOutOfRangeException
Removes the day at a specific index.

Parameters:
index - the index
Throws:
ArgumentOutOfRangeException - the argument out of range exception

getWeekCollectionAtIndex

public DayOfTheWeek getWeekCollectionAtIndex(int index)
Gets the DayOfTheWeek at a specific index in the collection.

Parameters:
index - the index
Returns:
DayOfTheWeek at index

getCount

public int getCount()
Gets the number of days in the collection.

Returns:
the count

iterator

public java.util.Iterator<DayOfTheWeek> iterator()
Specified by:
iterator in interface java.lang.Iterable<DayOfTheWeek>