Examples of nonOptionArguments()


Examples of joptsimple.OptionSet.nonOptionArguments()

        parser.accepts("k", "key size").withRequiredArg().ofType(Integer.class);
        parser.accepts("v", "value size").withRequiredArg().ofType(Integer.class);
        parser.accepts("p", "prefix").withRequiredArg();

        OptionSet options = parser.parse(args);
        List<String> nonOptions = (List<String>) options.nonOptionArguments();

        if(nonOptions.size() != 3) {
            printUsage(System.err, parser);
        }
View Full Code Here

Examples of joptsimple.OptionSet.nonOptionArguments()

              .withRequiredArg()
              .ofType(Integer.class);
        parser.accepts("help");

        OptionSet options = parser.parse(args);
        List<String> rest = (List<String>) options.nonOptionArguments();
        if(rest.size() < 2 || options.has("help")) {
            parser.printHelpOn(System.err);
            System.err.println("Usage: ClientConnectionStressTest <options> url store-name");
            System.exit(0);
        }
View Full Code Here

Examples of joptsimple.OptionSet.nonOptionArguments()

              .withRequiredArg()
              .ofType(Integer.class)
              .withValuesSeparatedBy(',');
        OptionSet options = parser.parse(args);

        List<String> nonOptions = (List<String>) options.nonOptionArguments();

        if(args.length < 2) {
            System.out.println(usageStr);
            return;
        }
View Full Code Here

Examples of joptsimple.OptionSet.nonOptionArguments()

              .withRequiredArg()
              .describedAs("zone-id")
              .ofType(Integer.class);
        OptionSet options = parser.parse(args);

        List<String> nonOptions = (List<String>) options.nonOptionArguments();
        if(nonOptions.size() < 2 || nonOptions.size() > 3) {
            System.err.println("Usage: java VoldemortClientShell store_name bootstrap_url [command_file] [options]");
            parser.printHelpOn(System.err);
            System.exit(-1);
        }
View Full Code Here

Examples of joptsimple.OptionSet.nonOptionArguments()

    @SuppressWarnings("unchecked")
    public static void main(String[] args) throws Exception {
        OptionParser parser = new OptionParser();
        OptionSet options = parser.parse(args);

        List<String> nonOptions = (List<String>) options.nonOptionArguments();
        if(nonOptions.size() < 2 || nonOptions.size() > 3) {
            System.err.println("Usage: java VoldemortThinClientShell store_name coordinator_url [command_file] [options]");
            parser.printHelpOn(System.err);
            System.exit(-1);
        }
View Full Code Here

Examples of joptsimple.OptionSet.nonOptionArguments()

            ReadManyTest.uniform("UniformReadEmpty", 1, ReadManyTest.EMPTY),
            ReadManyTest.uniform("UniformReadFiles", 1, ReadManyTest.FILES),
            ReadManyTest.uniform("UniformReadNodes", 1, ReadManyTest.NODES),
        };

        Set<String> argset = Sets.newHashSet(options.nonOptionArguments());
        List<RepositoryFixture> fixtures = Lists.newArrayList();
        for (RepositoryFixture fixture : allFixtures) {
            if (argset.remove(fixture.toString())) {
                fixtures.add(fixture);
            }
View Full Code Here

Examples of joptsimple.OptionSet.nonOptionArguments()

            ReadManyTest.uniform("UniformReadNodes", 1, ReadManyTest.NODES),
            new ConcurrentCreateNodesTest(),
            new SequentialCreateNodesTest(),
        };

        Set<String> argset = Sets.newHashSet(options.nonOptionArguments());
        List<RepositoryFixture> fixtures = Lists.newArrayList();
        for (RepositoryFixture fixture : allFixtures) {
            if (argset.remove(fixture.toString())) {
                fixtures.add(fixture);
            }
View Full Code Here

Examples of joptsimple.OptionSet.nonOptionArguments()

            ReadManyTest.uniform("UniformReadNodes", 1, ReadManyTest.NODES),
            new ConcurrentCreateNodesTest(),
            new SequentialCreateNodesTest(),
        };

        Set<String> argset = Sets.newHashSet(options.nonOptionArguments());
        List<RepositoryFixture> fixtures = Lists.newArrayList();
        for (RepositoryFixture fixture : allFixtures) {
            if (argset.remove(fixture.toString())) {
                fixtures.add(fixture);
            }
View Full Code Here

Examples of joptsimple.OptionSet.nonOptionArguments()

  @Override
  public int run(InputStream in, PrintStream out, PrintStream err,
                 List<String> args) throws Exception {
    OptionSet optionSet = parser.parse(args.toArray(new String[args.size()]));

    if (!optionSet.nonOptionArguments().isEmpty()) {
      printUsage(err);
      return -1;
    }

    try {
View Full Code Here

Examples of joptsimple.OptionSet.nonOptionArguments()

        catch (Exception e) {
            System.err.println(e);
            System.exit(1);
        }
       
        List<String> arguments = options.nonOptionArguments();
       
        // Print help options
        if(options.has("h") || (arguments.size() != 1)){
            try {
                System.out.println("Usage: java edu.byu.ece.bitstreamTools.bitstream.test.CompareEmptyBitstreams <architecture>\n");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.