navigation/common/src/main/java/androidx/navigation/NavGraph.java
public void addDestinations(@NonNull Collection<NavDestination> nodes) {
        for (NavDestination node : nodes) {
            if (node == null) {
                continue;
            }
            addDestination(node);
        }
    }
/**
     * Adds multiple destinations to this NavGraph. Each destination must have an
     * {@link NavDestination#getId()} id} set.
     *
     * <p> Each destination must not have a {@link NavDestination#getParent() parent} set. If
     * any destination is already part of a {@link NavGraph navigation graph}, call
     * {@link #remove(NavDestination)} before calling this method.</p>
     *
     * @param nodes destinations to add
     */
Adds multiple destinations to this NavGraph. Each destination must have an
NavDestination#getId() id} set.

 Each destination must not have a  NavDestination#getParent() parent set. If
any destination is already part of a  NavGraph navigation graph, call
#remove(NavDestination) before calling this method.

@param nodes destinations to add
Adds multiple destinations to this NavGraph . Each destination must have an NavDestination#getId () id } set . Each destination must not have a NavDestination#getParent () parent set . If any destination is already part of a NavGraph navigation graph call #remove ( NavDestination ) before calling this method . @param nodes destinations to add
public void addDestinations(@NonNull Collection<NavDestination> nodes) {
        for (NavDestination node : nodes) {
            if (node == null) {
                continue;
            }
            addDestination(node);
        }
    }
public void addDestinations ( @ NonNull Collection < NavDestination > nodes ) { for ( NavDestination node : nodes ) { if ( node == null ) { continue ; } addDestination ( node ) ; } }
Adds multiple destinations to this NavGraph.
Adds multiple destinations to this NavGraph .