This topic has not yet been rated - Rate this topic

MapEnumerator.definitionString Method

Returns a description of the enumerator.


public str definitionString()

Called

A string that contains a description of the enumerator.

For example, an enumerator for a map of integers to strings would return "[int -> str] enumerator".

The following example creates a map and an enumerator for it, and then it prints out a definition of the enumerator.

{
    Map myMap = new Map(Types::Integer, Types::String);
    MapEnumerator  enumerator;
    int i;
    ;
 
    // Add some elements to the map
    myMap.insert(1, "Element one");
    myMap.insert(2, "Element two");
    myMap.insert(3, "Element three");
    myMap.insert(4, "Element Four");
 
    // Set the enumerator
    enumerator = myMap.getEnumerator();
 
    print enumerator.definitionString();
    pause;
}
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ