
nsISimpleEnumerator
This interface is used to enumerate over elements defined by its implementor. Although
hasMoreElementscan be called independently ofgetNext, getNextmust be preceded by a call tohasMoreElements. There is no way to "reset" an enumerator once it has been obtained. This interface is scriptable.Determines 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 subsequentgetNextcalls. This does not affect internal state of enumerator.Syntax:
boolean nsISimpleEnumerator::hasMoreElements()Parameters:
nsresult:
Called to retrieve the next element in the enumerator. The "next" element is the first element upon the first call. Must be preceded by a call to
hasMoreElementswhich returnsPR_TRUE.This method is generally called within a loop to iterate over the elements in the enumerator.Syntax:
nsISupports nsISimpleEnumerator::getNext()Parameters:
nsresult:
| Written by:Ellen Evans | Comments, questions, complaints?
Bug 143387 |