navigation/common/src/main/java/androidx/navigation/NavGraph.java
public void clear() {
        Iterator<NavDestination> iterator = iterator();
        while (iterator.hasNext()) {
            iterator.next();
            iterator.remove();
        }
    }
/**
     * Clear all destinations from this navigation graph.
     */
Clear all destinations from this navigation graph.
Clear all destinations from this navigation graph .
public void clear() {
        Iterator<NavDestination> iterator = iterator();
        while (iterator.hasNext()) {
            iterator.next();
            iterator.remove();
        }
    }
public void clear ( ) { Iterator < NavDestination > iterator = iterator ( ) ; while ( iterator . hasNext ( ) ) { iterator . next ( ) ; iterator . remove ( ) ; } }
Clear all destinations from this navigation graph.
Clear all destinations from this navigation graph .