private int synchroizeTaskIDToHierarchy ( Task parentTask , int currentID ) { for ( Task task : parentTask . getChildTasks ( ) ) { task . setID ( Integer . valueOf ( currentID ++ ) ) ; add ( task ) ; currentID = synchroizeTaskIDToHierarchy ( task , currentID ) ; } return currentID ; }
Called recursively to renumber child task IDs .