MapEnumerator.moveNext Method
Determines whether the enumerator points to a valid map element.
Syntax
public boolean moveNext()
Run On
Called
Return Value
Type: boolean
true if the current position in the map holds a valid element; otherwise false.
Remarks
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.
Examples
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;
}