nsISimpleEnumerator

IID:D1899240-F9D2-11D2-BDD6-000064657374
Inherits From:nsISupports
Status:FROZEN

Used to enumerate over elements defined by its implementor. Although hasMoreElements() can be called independently of getNext(), getNext() must be pre-ceeded by a call to hasMoreElements(). There is no way to "reset" an enumerator, once you obtain one.


Methods

nsISupports getNext ( ) PRBool hasMoreElements ( )

nsISupports getNext ( )

Called to retrieve the next element in the enumerator. The "next" element is the first element upon the first call. Must be pre-ceeded by a call to hasMoreElements() which returns PR_TRUE. This method is generally called within a loop to iterate over the elements in the enumerator.

Returns:
the next element in the enumeration.

PRBool hasMoreElements ( )

Called to determine whether or not the enumerator has any elements that can be returned via getNext(). This method is generally used to determine whether or not to initiate or continue iteration over the enumerator, though it can be called without subsequent getNext() calls. Does not affect internal state of enumerator.

Returns:
PR_TRUE if there are remaining elements in the enumerator. PR_FALSE if there are no more elements in the enumerator.

References

This interface is the type of the following properties:

nsIAbDirectory.childNodes, nsICookieManager.enumerator, nsIExtensionManager.installLocations, nsIFastLoadReadControl.dependencies, nsIFile.directoryEntries, nsIFilePicker.files, nsILoadGroup.requests, nsIPasswordManager.enumerator, nsIPasswordManager.rejectEnumerator, nsIPermissionManager.enumerator, nsIPropertyBag.enumerator, nsISHistory.SHistoryEnumerator, nsIToolkitProfileService.profiles, nsIWebServiceProxy.pendingCalls

This interface is passed as an argument to the following methods:

nsIMsgDBView.openWithHdrs

This interface is returned from the following methods:

nsIAbBase.GetChildNodes, nsIAbDirFactory.createDirectory, nsIArray.enumerate, nsICategoryManager.enumerateCategories, nsICategoryManager.enumerateCategory, nsIClipboardDragDropHookList.getHookEnumerator, nsIComponentRegistrar.enumerateCIDs, nsIComponentRegistrar.enumerateContractIDs, nsIControllerCommandGroup.getEnumeratorForGroup, nsIControllerCommandGroup.getGroupsEnumerator, nsIDirectoryServiceProvider2.getFiles, nsIDocShell.getDocShellEnumerator, nsIFontList.availableFonts, nsIFullScreen.getChromeItems, nsIInterfaceInfoSuperManager.enumerateAdditionalManagers, nsIMsgDatabase.EnumerateMessages, nsIMsgDatabase.EnumerateOfflineOps, nsIMsgDatabase.EnumerateThreads, nsIMsgFolder.getMessages, nsIMsgThread.EnumerateMessages, nsIObserverService.enumerateObservers, nsIPersistentProperties.enumerate, nsIPrintOptions.availablePrinters, nsIRDFCompositeDataSource.GetDataSources, nsIRDFContainer.GetElements, nsIRDFDataSource.ArcLabelsIn, nsIRDFDataSource.ArcLabelsOut, nsIRDFDataSource.GetAllCmds, nsIRDFDataSource.GetAllResources, nsIRDFDataSource.GetSources, nsIRDFDataSource.GetTargets, nsIStringBundle.getSimpleEnumeration, nsIStringBundleOverride.enumerateKeysInBundle, nsIWindowMediator.getEnumerator, nsIWindowMediator.getXULWindowEnumerator, nsIWindowMediator.getZOrderDOMWindowEnumerator, nsIWindowMediator.getZOrderXULWindowEnumerator, nsIWindowWatcher.getWindowEnumerator, nsIXULOverlayProvider.getStyleOverlays, nsIXULOverlayProvider.getXULOverlays, nsIZipReader.findEntries

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com