Package org.apache.commons.cli2.builder

Examples of org.apache.commons.cli2.builder.GroupBuilder.withMaximum()


      withShortName("nh").withArgument(argumentBuilder.withMaximum(1).withMinimum(1).
      withName("number").create()).withRequired(true).create();

    Option observedStateNumberOption = optionBuilder.withLongName("nrOfObservedStates").
      withDescription("Number of observed states").
      withShortName("no").withArgument(argumentBuilder.withMaximum(1).withMinimum(1).
      withName("number").create()).withRequired(true).create();

    Option epsilonOption = optionBuilder.withLongName("epsilon").
      withDescription("Convergence threshold").
      withShortName("e").withArgument(argumentBuilder.withMaximum(1).withMinimum(1).
View Full Code Here


      withShortName("no").withArgument(argumentBuilder.withMaximum(1).withMinimum(1).
      withName("number").create()).withRequired(true).create();

    Option epsilonOption = optionBuilder.withLongName("epsilon").
      withDescription("Convergence threshold").
      withShortName("e").withArgument(argumentBuilder.withMaximum(1).withMinimum(1).
      withName("number").create()).withRequired(true).create();

    Option iterationsOption = optionBuilder.withLongName("max-iterations").
      withDescription("Maximum iterations number").
      withShortName("m").withArgument(argumentBuilder.withMaximum(1).withMinimum(1).
View Full Code Here

      withShortName("e").withArgument(argumentBuilder.withMaximum(1).withMinimum(1).
      withName("number").create()).withRequired(true).create();

    Option iterationsOption = optionBuilder.withLongName("max-iterations").
      withDescription("Maximum iterations number").
      withShortName("m").withArgument(argumentBuilder.withMaximum(1).withMinimum(1).
      withName("number").create()).withRequired(true).create();

    Group optionGroup = new GroupBuilder().withOption(inputOption).
      withOption(outputOption).withOption(stateNumberOption).withOption(observedStateNumberOption).
      withOption(epsilonOption).withOption(iterationsOption).
View Full Code Here

    DefaultOptionBuilder optionBuilder = new DefaultOptionBuilder();
    ArgumentBuilder argumentBuilder = new ArgumentBuilder();

    Option outputOption = optionBuilder.withLongName("output").
      withDescription("Output file with sequence of observed states").
      withShortName("o").withArgument(argumentBuilder.withMaximum(1).withMinimum(1).
      withName("path").create()).withRequired(false).create();

    Option modelOption = optionBuilder.withLongName("model").
      withDescription("Path to serialized HMM model").
      withShortName("m").withArgument(argumentBuilder.withMaximum(1).withMinimum(1).
View Full Code Here

      withShortName("o").withArgument(argumentBuilder.withMaximum(1).withMinimum(1).
      withName("path").create()).withRequired(false).create();

    Option modelOption = optionBuilder.withLongName("model").
      withDescription("Path to serialized HMM model").
      withShortName("m").withArgument(argumentBuilder.withMaximum(1).withMinimum(1).
      withName("path").create()).withRequired(true).create();

    Option lengthOption = optionBuilder.withLongName("length").
      withDescription("Length of generated sequence").
      withShortName("l").withArgument(argumentBuilder.withMaximum(1).withMinimum(1).
View Full Code Here

      withShortName("m").withArgument(argumentBuilder.withMaximum(1).withMinimum(1).
      withName("path").create()).withRequired(true).create();

    Option lengthOption = optionBuilder.withLongName("length").
      withDescription("Length of generated sequence").
      withShortName("l").withArgument(argumentBuilder.withMaximum(1).withMinimum(1).
      withName("number").create()).withRequired(true).create();

    Group optionGroup = new GroupBuilder().
      withOption(outputOption).withOption(modelOption).withOption(lengthOption).
      withName("Options").create();
View Full Code Here

   
    if(option1.hasArg()){
      final ArgumentBuilder abuilder = new ArgumentBuilder();
      final String argName = option1.getArgName();
      abuilder.withName(argName);
      abuilder.withMaximum(option1.getArgs());
      if(option1.hasValueSeparator()){
        abuilder.withSubsequentSeparator(option1.getValueSeparator());
      }
      if(option1.hasOptionalArg()){
        abuilder.withMinimum(0);
View Full Code Here

    };
    gBuilder.withOption(aBuilder.reset().withName(PROPERTIES).withDescription(
        "are configuration name-value pairs which override values. For example: wrapper.debug=true").withMinimum(0).withValidator(pValidator)
        .create());

    gBuilder.withMaximum(3);
    group = gBuilder.create();

  }

}
View Full Code Here

      final org.apache.commons.cli.Option option1 = (org.apache.commons.cli.Option)i.next();
      final Option option2 = option(option1);
      gbuilder.withOption(option2);
    }
   
    gbuilder.withMaximum(1);
   
    if(optionGroup1.isRequired()){
      gbuilder.withMinimum(1);
    }
   
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.