code: public NavigationResultBuilder add(UICommandMetadata metadata, Iterable<Class<? extends UICommand>> types)
     {
        List<NavigationResultEntry> internalEntries = new ArrayList<>();
        for (Class<? extends UICommand> type : types)
        {
           if (UIWizard.class.isAssignableFrom(type))
           {
              throw new IllegalArgumentException("A UICommand of type " + type + " was added. "
                       + UIWizard.class.getSimpleName() + " instances should be added individually.");
           }
           else
           {
              internalEntries.add(new ClassNavigationResultEntry(type));
           }
        }
        entries.add(new CompositeNavigationResultEntry(metadata, internalEntries));
        return this;
     }
docs: Add multiple UICommand types to create a single navigation entry. Every invocation of this method creates a
  separate navigation entry. UIWizard types must not be provided as arguments since wizards and wizard steps cannot
  be combined with other UICommand types in the same navigation entry.
  
  Use the other add(...) methods to add UIWizard types.
  
  @param metadata The command metadata
  @param types The UICommand types to add as a single navigation entry
  @return This NavigationResultBuilder instance