SetEnumerator.definitionString Method

Returns a description of the enumerator.

Syntax

public str definitionString()

Run On

Called

Return Value

Type: str
A string that contains a description of the enumerator.

Remarks

For example, an enumerator for a set of integers would return "int set enumerator".

Examples

The following example creates a set and an enumerator for the set. The definitionString method is used to print a description of the enumerator.

{ 
    Set mySet = new Set(Types::Integer); 
    SetEnumerator enumerator; 
    int i; 
  
    // Add some elements to the set. 
   for (i = 0; i < 10; i++) 
    { 
        mySet.add(i); 
    } 
    // Set the enumerator. 
    enumerator = mySet.getEnumerator(); 
  
    print enumerator.definitionString(); 
    pause; 
}

See Also

SetEnumerator Class

SetEnumerator.toString Method