navigation/common/src/main/java/androidx/navigation/NavGraph.java
public void addAll(@NonNull NavGraph other) {
        Iterator<NavDestination> iterator = other.iterator();
        while (iterator.hasNext()) {
            NavDestination destination = iterator.next();
            iterator.remove();
            addDestination(destination);
        }
    }
/**
     * Add all destinations from another collection to this one. As each destination has at most
     * one parent, the destinations will be removed from the given NavGraph.
     *
     * @param other collection of destinations to add. All destinations will be removed from this
     * graph after being added to this graph.
     */
Add all destinations from another collection to this one. As each destination has at most
one parent, the destinations will be removed from the given NavGraph.

@param other collection of destinations to add. All destinations will be removed from this
graph after being added to this graph.
Add all destinations from another collection to this one . As each destination has at most one parent the destinations will be removed from the given NavGraph . @param other collection of destinations to add . All destinations will be removed from this graph after being added to this graph .
public void addAll(@NonNull NavGraph other) {
        Iterator<NavDestination> iterator = other.iterator();
        while (iterator.hasNext()) {
            NavDestination destination = iterator.next();
            iterator.remove();
            addDestination(destination);
        }
    }
public void addAll ( @ NonNull NavGraph other ) { Iterator < NavDestination > iterator = other . iterator ( ) ; while ( iterator . hasNext ( ) ) { NavDestination destination = iterator . next ( ) ; iterator . remove ( ) ; addDestination ( destination ) ; } }
Add all destinations from another collection to this one.
Add all destinations from another collection to this one .