public void presentLicenses(boolean preAccept){
  LicenseSet licenses=licenseModule.getRequiredLicenses();
  if (preAccept) {
    licenses.acceptAll();
  }
 else {
    for (    License license : licenses) {
      if (license.isAccepted()) {
        continue;
      }
      user.show("");
      user.show(license.getLicenseText());
      String input=user.ask("prompt");
      if (input != null && YES.startsWith(input.toLowerCase())) {
        license.accept();
      }
 else {
        license.reject();
      }
    }
  }
}

public void presentLicenses ( boolean preAccept ) { LicenseSet licenses = licenseModule . getRequiredLicenses ( ) ; if ( preAccept ) { licenses . acceptAll ( ) ; } else { for ( License license : licenses ) { if ( license . isAccepted ( ) ) { continue ; } user . show ( "" ) ; user . show ( license . getLicenseText ( ) ) ; String input = user . ask ( "prompt" ) ; if ( input != null && YES . startsWith ( input . toLowerCase ( ) ) ) { license . accept ( ) ; } else { license . reject ( ) ; } } } }
present the licenses to the user - if the preaccept parameter is set , then simply display them through system . out . otherwise display each one and confirm that the user agrees before displaying the next . finally , check that all licenses have been agreed to before continuing .
