microsoft.exchange.webservices.data
Class ItemCollection<TItem extends Item>

java.lang.Object
  extended by microsoft.exchange.webservices.data.ComplexProperty
      extended by microsoft.exchange.webservices.data.ItemCollection<TItem>
Type Parameters:
TItem - the generic type. The type of item the collection contains.
All Implemented Interfaces:
java.lang.Iterable<TItem>

public final class ItemCollection<TItem extends Item>
extends ComplexProperty
implements java.lang.Iterable<TItem>

Represents a collection of items.


Constructor Summary
protected ItemCollection()
          Initializes a new instance of the "ItemCollection<TItem>" class.
 
Method Summary
 int getCount()
          Gets the total number of items in the collection.
 TItem getItem(int index)
          Gets the item at the specified index.
 java.util.Iterator<TItem> getIterator()
          Gets an iterator that iterates through the elements of the collection.
 java.util.Iterator<TItem> iterator()
          Returns an iterator over a set of elements of type T.
protected  void loadFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader, java.lang.String localElementName)
          Loads from XML.
 
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, writeToXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ItemCollection

protected ItemCollection()
Initializes a new instance of the "ItemCollection<TItem>" class.

Method Detail

loadFromXml

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

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

getCount

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

Returns:
the count

getItem

public TItem getItem(int index)
Gets the item at the specified index.

Parameters:
index - The zero-based index of the item to get.
Returns:
The item at the specified index.

getIterator

public java.util.Iterator<TItem> getIterator()
Gets an iterator that iterates through the elements of the collection.

Returns:
An Iterator for the collection.

iterator

public java.util.Iterator<TItem> iterator()
Returns an iterator over a set of elements of type T.

Specified by:
iterator in interface java.lang.Iterable<TItem extends Item>
Returns:
an Iterator.