public static void checkOptional(OptionSet options, List<String> opts)
            throws VoldemortException {
        List<String> optCopy = Lists.newArrayList();
        for(String opt: opts) {
            if(options.has(opt)) {
                optCopy.add(opt);
            }
        }
        if(optCopy.size() > 1) {
            System.err.println("Conflicting options:");
            for(String opt: optCopy) {
                System.err.println("--" + opt);
            }
            throw new VoldemortException("Conflicting options detected.");
        }
    }
public static void checkOptional ( OptionSet options , List < String > opts ) throws VoldemortException { List < String > optCopy = Lists . newArrayList ( ) ; for ( String opt : opts ) { if ( options . has ( opt ) ) { optCopy . add ( opt ) ; } } if ( optCopy . size ( ) > 1 ) { System . err . println ( "Conflicting options:" ) ; for ( String opt : optCopy ) { System . err . println ( "--" + opt ) ; } throw new VoldemortException ( "Conflicting options detected." ) ; } }
Checks if there's at most one option that exists among all opts.

@param parser OptionParser to checked
@param opts List of options to be checked
@throws VoldemortException