Package com.martiansoftware.jsap

Examples of com.martiansoftware.jsap.QualifiedSwitch


                .setLongFlag(JSAP.NO_LONGFLAG);

    opt1.setHelp("The number of times to say hello.");
    jsap.registerParameter(opt1);
   
    QualifiedSwitch sw1 = (QualifiedSwitch)
                (new QualifiedSwitch("verbose")
                .setShortFlag('v')
                .setLongFlag("verbose")
                .setList(true)
                .setListSeparator(','));
   
    sw1.setHelp("Requests verbose output.");
    jsap.registerParameter(sw1);
   
    UnflaggedOption opt2 = new UnflaggedOption("name")
                .setStringParser(JSAP.STRING_PARSER)
                .setDefault("World")
View Full Code Here


      "MyProgram",
      "Repeats \"Hello, world!\" multiple times",
      new Parameter[] {
        new FlaggedOption( "count", JSAP.INTEGER_PARSER, "1", JSAP.REQUIRED, 'n', JSAP.NO_LONGFLAG,
          "The number of times to say hello." ),
        new QualifiedSwitch( "verbose", JSAP.STRING_PARSER, JSAP.NO_DEFAULT, JSAP.NOT_REQUIRED, 'v', "verbose",
          "Requests verbose output." ).setList( true ).setListSeparator( ',' ),
        new UnflaggedOption( "name", JSAP.STRING_PARSER, "World", JSAP.REQUIRED, JSAP.GREEDY,
          "One or more names of people you would like to greet." )
      }
    );
View Full Code Here

  protected void configure(QualifiedSwitch qs) {
    super.configure(qs);
  }

  public Parameter getConfiguredParameter() {
    QualifiedSwitch result = new QualifiedSwitch(getId());
    configure(result);
    return (result);
  }
View Full Code Here

                .setLongFlag(JSAP.NO_LONGFLAG);

  opt8.setHelp("Show verbose data during run.");
  jsap.registerParameter(opt8);

  QualifiedSwitch opt9 = (QualifiedSwitch) new QualifiedSwitch(Config.CONFIDENCE.toString()).setShortFlag('c')
                          .setLongFlag("confidence")
                          .setList(JSAP.NOT_LIST)
                          .setStringParser(JSAP.DOUBLE_PARSER)
                          .setRequired(false);
  opt9.setHelp("Calculate and show confidence intervals");
  jsap.registerParameter(opt9);

  return jsap;
    }
View Full Code Here

TOP

Related Classes of com.martiansoftware.jsap.QualifiedSwitch

Copyright © 2018 www.massapicom. 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.