Examples of ArgumentBuilder


Examples of org.apache.commons.cli2.builder.ArgumentBuilder

 
  private Job() { }
 
  public static void main(String[] args) throws Exception {
    DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
    ArgumentBuilder abuilder = new ArgumentBuilder();
    GroupBuilder gbuilder = new GroupBuilder();
   
    Option inputOpt = DefaultOptionCreator.inputOption().withRequired(false).create();
    Option outputOpt = DefaultOptionCreator.outputOption().withRequired(false).create();
    Option convergenceDeltaOpt = DefaultOptionCreator.convergenceOption().withRequired(false).create();
    Option maxIterationsOpt = DefaultOptionCreator.maxIterOption().withRequired(false).create();
   
    Option measureClassOpt = obuilder.withLongName("distance").withRequired(false).withArgument(
      abuilder.withName("distance").withMinimum(1).withMaximum(1).create()).withDescription(
      "The Distance Measure to use.  Default is SquaredEuclidean").withShortName("m").create();
   
    Option t1Opt = obuilder.withLongName("t1").withRequired(false).withArgument(
      abuilder.withName("t1").withMinimum(1).withMaximum(1).create()).withDescription("The t1 value to use.")
        .withShortName("m").create();
    Option t2Opt = obuilder.withLongName("t2").withRequired(false).withArgument(
      abuilder.withName("t2").withMinimum(1).withMaximum(1).create()).withDescription("The t2 value to use.")
        .withShortName("m").create();
    Option vectorClassOpt = obuilder.withLongName("vectorClass").withRequired(false).withArgument(
      abuilder.withName("vectorClass").withMinimum(1).withMaximum(1).create()).withDescription(
      "The Vector implementation class name.  Default is RandomAccessSparseVector.class").withShortName("v")
        .create();
   
    Option helpOpt = DefaultOptionCreator.helpOption();
   
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.