MapEnumerator.moveNext Method [AX 2012]

Determines whether the enumerator points to a valid map element.

public boolean moveNext()

Run On

Called

Return Value

Type: boolean
true if the current position in the map holds a valid element; otherwise false.

Map enumerators start before the first element in the map. You must call the moveNext method to make it point to the first element in the map.

The following example uses the moveNext method to iterate over the tables that are contained in a project and adds them to a new map that contains a DictTable object for each table. (DictTable lets you access information about a table.)

{ 
    Map map = Map::create( 
        SysUmlDataModel::getProjectTablesClient(projectNode)); 
    MapEnumerator enum = map.getEnumerator(); 
    TableName tableName; 
 
    while (enum.moveNext()) 
    { 
        tableName = enum.currentKey(); 
        map.insert(tableName, new DictTable(tablename2id(tableName))); 
    } 
    return map; 
}

Community Additions

ADD
Show: