com.moyosoft.exchange.folder
Interface FoldersIterator

All Superinterfaces:
java.util.Iterator<ExchangeFolder>

public interface FoldersIterator
extends java.util.Iterator<ExchangeFolder>

Iterator over Exchange folders.

Although this class implements the Iterator interface, it's preferable to use the method nextFolder() instead of Iterator.next() as the later cannot throw checked exceptions.


Method Summary
 boolean hasNext()
          Returns true if the iteration has more elements.
 ExchangeFolder next()
          Deprecated. use the method nextFolder() instead.
 ExchangeFolder nextFolder()
           
 void remove()
          Deprecated. use the method ExchangeFolder.delete() instead.
 

Method Detail

hasNext

boolean hasNext()
Returns true if the iteration has more elements.

Specified by:
hasNext in interface java.util.Iterator<ExchangeFolder>
Returns:
true if the iterator has more elements.

next

ExchangeFolder next()
Deprecated. use the method nextFolder() instead.

Specified by:
next in interface java.util.Iterator<ExchangeFolder>
Returns:
the next folder in the iteration.
Throws:
java.util.NoSuchElementException - encapsulating a ExchangeServiceException if any errors occur during the communication with Exchange.
See Also:
nextFolder()

remove

void remove()
Deprecated. use the method ExchangeFolder.delete() instead.

This method always throws an UnsupportedOperationException as the remove operation is not supported by this iterator. To delete a folder use the method ExchangeFolder.delete(boolean).

Specified by:
remove in interface java.util.Iterator<ExchangeFolder>
Throws:
java.lang.UnsupportedOperationException - always
See Also:
ExchangeFolder.delete(boolean)

nextFolder

ExchangeFolder nextFolder()
                          throws ExchangeServiceException
Returns:
the next folder in the iteration.
Throws:
ExchangeServiceException - if any errors occur during the communication with Exchange.