Class DayOfTheWeekCollection
- java.lang.Object
-
- microsoft.exchange.webservices.data.property.complex.ComplexProperty
-
- microsoft.exchange.webservices.data.property.complex.recurrence.DayOfTheWeekCollection
-
- All Implemented Interfaces:
Iterable<DayOfTheWeek>,ISelfValidate,ComplexFunctionDelegate<EwsServiceXmlReader>
public final class DayOfTheWeekCollection extends ComplexProperty implements Iterable<DayOfTheWeek>
Represents a collection of DayOfTheWeek values.
-
-
Constructor Summary
Constructors Constructor Description DayOfTheWeekCollection()Initializes a new instance of the class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(DayOfTheWeek dayOfTheWeek)Adds a day to the collection if it is not already present.voidaddRange(Iterator<DayOfTheWeek> daysOfTheWeek)Adds multiple days to the collection if they are not already present.voidclear()Clears the collection.intgetCount()Gets the number of days in the collection.DayOfTheWeekgetWeekCollectionAtIndex(int index)Gets the DayOfTheWeek at a specific index in the collection.Iterator<DayOfTheWeek>iterator()voidloadFromXml(EwsServiceXmlReader reader, String xmlElementName)Loads from XML.booleanremove(DayOfTheWeek dayOfTheWeek)Remove a specific day from the collection.voidremoveAt(int index)Removes the day at a specific index.StringtoString()Builds string representation of the collection.voidwriteToXml(EwsServiceXmlWriter writer, String xmlElementName)Gets the request version.-
Methods inherited from class microsoft.exchange.webservices.data.property.complex.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
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
DayOfTheWeekCollection
public DayOfTheWeekCollection()
Initializes a new instance of the class.
-
-
Method Detail
-
loadFromXml
public void loadFromXml(EwsServiceXmlReader reader, String xmlElementName) throws Exception
Loads from XML.- Overrides:
loadFromXmlin classComplexProperty- Parameters:
reader- The reader.xmlElementName- Name of the XML element.- Throws:
Exception- the exception
-
writeToXml
public void writeToXml(EwsServiceXmlWriter writer, String xmlElementName) throws XMLStreamException, ServiceXmlSerializationException
Gets the request version.- Overrides:
writeToXmlin classComplexProperty- Parameters:
writer- the writerxmlElementName- the xml element name- Throws:
XMLStreamException- the XML stream exceptionServiceXmlSerializationException- the service xml serialization exception
-
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(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 Iterator<DayOfTheWeek> iterator()
- Specified by:
iteratorin interfaceIterable<DayOfTheWeek>
-
-