SetEnumerator Class
The SetEnumerator class lets you traverse the elements in a set.
Syntax
class SetEnumerator extends Object implements Enumerator
Run On
Called
Methods
Method | Description | |
---|---|---|
cancelTimeOut | Cancels a previous method call to the setTimeOut method. (Inherited from Object.) | |
current | Retrieves the value that is pointed to by the enumerator. | |
definitionString | Returns a description of the enumerator. | |
equal | Determines whether the specified object is equal to the current one. (Inherited from Object.) | |
getTimeOutTimerHandle | Returns the timer handle for the object. (Inherited from Object.) | |
handle | Retrieves the handle of the class of the object. (Inherited from Object.) | |
moveNext | Determines whether the enumerator denotes a valid set element. | |
new | Initializes a new instance of the Object class. (Inherited from Object.) | |
notify | Releases the hold on an object that has called the wait method on this object. (Inherited from Object.) | |
notifyAll | Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.) | |
objectOnServer | Determines whether the object is on a server. (Inherited from Object.) | |
owner | Returns the instance that owns the object. (Inherited from Object.) | |
reset | Moves the enumerator to the start of the set. | |
setTimeOut | Sets up the scheduled execution of a specified method. (Inherited from Object.) | |
toString | Retrieves a description of the contents of the element in the set that the enumerator currently points to. (Overrides the toString Method.) | |
usageCount | Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.) | |
wait | Pauses a process. (Inherited from Object.) | |
xml | Returns an XML string that represents the current object. (Inherited from Object.) |
Top
Remarks
Set enumerators start before the first element in the set. You must call the SetEnumerator.moveNext method to make it point to the first element in the set.
As a best practice, use the SetEnumerator class instead of the SetIterator class, because enumerators are automatically created on the same tier as the set when the set.getEnumerator method is called. This helps you avoid a potential problem in code that is marked as Called from, where the iterator and set can be on separate tiers. In addition, set enumerators require less code than set iterators and therefore perform slightly better.
Inheritance Hierarchy
Object Class
SetEnumerator Class