You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.
nsISimpleEnumerator
This interface is used to enumerate over elements defined by its implementor. Although
hasMoreElements
can be called independently ofgetNext, getNext
must 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 subsequentgetNext
calls. 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
hasMoreElements
which 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 |