private boolean isHelpOptionPresent( OptionSet options ) { boolean helpOptionPresent = false; for ( AbstractOptionSpec<?> each : recognizedOptions.toJavaUtilMap().values() ) { if ( each.isForHelp() && options.has( each ) ) { helpOptionPresent = true; break; } } return helpOptionPresent; }
private boolean isHelpOptionPresent( OptionSet options ) { boolean helpOptionPresent = false; for ( AbstractOptionSpec<?> each : recognizedOptions.toJavaUtilMap().values() ) { if ( each.isForHelp() && options.has( each ) ) { helpOptionPresent = true; break; } } return helpOptionPresent; }
private void ensureRequiredOptions( OptionSet options ) { Collection<String> missingRequiredOptions = new HashSet<String>(); for ( AbstractOptionSpec<?> each : recognizedOptions.toJavaUtilMap().values() ) { if ( each.isRequired() && !options.has( each ) ) missingRequiredOptions.addAll( each.options() ); } boolean helpOptionPresent = false; for ( AbstractOptionSpec<?> each : recognizedOptions.toJavaUtilMap().values() ) { if ( each.isForHelp() ) { helpOptionPresent = true; break; } } if ( !missingRequiredOptions.isEmpty() && !helpOptionPresent ) // GemFire Addition : Add options detected so far throw new MissingRequiredOptionException( missingRequiredOptions, options ); }
private void ensureRequiredOptions( OptionSet options ) { Collection<String> missingRequiredOptions = new HashSet<String>(); for ( AbstractOptionSpec<?> each : recognizedOptions.toJavaUtilMap().values() ) { if ( each.isRequired() && !options.has( each ) ) missingRequiredOptions.addAll( each.options() ); } boolean helpOptionPresent = false; for ( AbstractOptionSpec<?> each : recognizedOptions.toJavaUtilMap().values() ) { if ( each.isForHelp() ) { helpOptionPresent = true; break; } } if ( !missingRequiredOptions.isEmpty() && !helpOptionPresent ) // GemFire Addition : Add options detected so far throw new MissingRequiredOptionException( missingRequiredOptions, options ); }
private void ensureRequiredOptions( OptionSet options ) { Collection<String> missingRequiredOptions = new HashSet<String>(); for ( AbstractOptionSpec<?> each : recognizedOptions.toJavaUtilMap().values() ) { if ( each.isRequired() && !options.has( each ) ) missingRequiredOptions.addAll( each.options() ); } boolean helpOptionPresent = false; for ( AbstractOptionSpec<?> each : recognizedOptions.toJavaUtilMap().values() ) { if ( each.isForHelp() ) { helpOptionPresent = true; break; } } if ( !missingRequiredOptions.isEmpty() && !helpOptionPresent ) // GemFire Addition : Add options detected so far throw new MissingRequiredOptionException( missingRequiredOptions, options ); }