(incubating) | The Free and Open Productivity Suite

Developer's Guide

API

SDK

Tips 'n' Tricks

Miscellaneous

Content for OpenOffice.org version 3.3.

:: com :: sun :: star :: container ::

interface XEnumeration
Description
provides functionality to enumerate the contents of a container.

An object that implements the XEnumeration interface generates a series of elements, one at a time. Successive calls to the XEnumeration::nextElement method return successive elements of the series.

For example (Java), to print all elements of a vector aVect:

 for ( XEnumeration xEnum = aVect.elements() ; 
 xEnum.hasMoreElements() ; ) 
 {
 System.out.println( xEnum.nextElement() );
 }
 

If the object changed, the behavior of the enumeration is not specified. This is not a remote interface.


Methods' Summary
hasMoreElements tests whether this enumeration contains more elements.  
nextElement  
Methods' Details
hasMoreElements
boolean
hasMoreElements();

Description
tests whether this enumeration contains more elements.
nextElement
any
nextElement()
raises( NoSuchElementException,
::com::sun::star::lang::WrappedTargetException );

Returns
the next element of this enumeration.
Throws
NoSuchElementException if no more elements exist.
Throws
com::sun::star::lang::WrappedTargetException If the implementation has internal reasons for exceptions, then wrap these in a ::com::sun::star::lang::WrappedTargetException exception.
Top of Page

Apache OpenOffice is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.

Copyright & License
Apache and the Apache feather logos are trademarks of The Apache Software Foundation. OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.