joptsimple.OptionSet.add()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(6.6k)|赞(0)|评价(0)|浏览(83)

本文整理了Java中joptsimple.OptionSet.add()方法的一些代码示例,展示了OptionSet.add()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OptionSet.add()方法的具体详情如下:
包路径:joptsimple.OptionSet
类名称:OptionSet
方法名:add

OptionSet.add介绍

暂无

代码示例

代码示例来源:origin: io.snappydata/gemfire-util

@Override
void handleOption( OptionParser parser, ArgumentList arguments, OptionSet detectedOptions,
  String detectedArgument ) {
  detectedOptions.add( this );
}

代码示例来源:origin: jopt-simple/jopt-simple

@Override
void handleOption( OptionParser parser, ArgumentList arguments, OptionSet detectedOptions,
  String detectedArgument ) {
  detectedOptions.add( this );
}

代码示例来源:origin: io.snappydata/gemfire-joptsimple

@Override
void handleOption( OptionParser parser, ArgumentList arguments, OptionSet detectedOptions,
  String detectedArgument ) {
  detectedOptions.add( this );
}

代码示例来源:origin: net.sf.jopt-simple/jopt-simple

@Override
void handleOption( OptionParser parser, ArgumentList arguments, OptionSet detectedOptions,
  String detectedArgument ) {
  detectedOptions.add( this );
}

代码示例来源:origin: org.apache.geode/geode-joptsimple

@Override
void handleOption( OptionParser parser, ArgumentList arguments, OptionSet detectedOptions,
  String detectedArgument ) {
  detectedOptions.add( this );
}

代码示例来源:origin: net.sf.jopt-simple/jopt-simple

private void handleOptionArgument( OptionParser parser, OptionSet detectedOptions, ArgumentList arguments ) {
    if ( parser.posixlyCorrect() ) {
      detectedOptions.add( this );
      parser.noMoreOptions();
    }
    else
      addArguments( detectedOptions, arguments.next() );
  }
}

代码示例来源:origin: org.apache.geode/geode-joptsimple

private void handleOptionArgument( OptionParser parser, OptionSet detectedOptions, ArgumentList arguments ) {
    if ( parser.posixlyCorrect() ) {
      detectedOptions.add( this );
      parser.noMoreOptions();
    }
    else
      addArguments( detectedOptions, arguments.next() );
  }
}

代码示例来源:origin: jopt-simple/jopt-simple

private void handleOptionArgument( OptionParser parser, OptionSet detectedOptions, ArgumentList arguments ) {
    if ( parser.posixlyCorrect() ) {
      detectedOptions.add( this );
      parser.noMoreOptions();
    }
    else
      addArguments( detectedOptions, arguments.next() );
  }
}

代码示例来源:origin: io.snappydata/gemfire-joptsimple

private void handleOptionArgument( OptionParser parser, OptionSet detectedOptions, ArgumentList arguments ) {
    if ( parser.posixlyCorrect() ) {
      detectedOptions.add( this );
      parser.noMoreOptions();
    }
    else
      addArguments( detectedOptions, arguments.next() );
  }
}

代码示例来源:origin: io.snappydata/gemfire-util

private void handleOptionArgument( OptionParser parser, OptionSet detectedOptions, ArgumentList arguments ) {
    if ( parser.posixlyCorrect() ) {
      detectedOptions.add( this );
      parser.noMoreOptions();
    }
    else
      addArguments( detectedOptions, arguments.next() );
  }
}

代码示例来源:origin: io.snappydata/gemfire-joptsimple

@Override
protected void detectOptionArgument( OptionParser parser, ArgumentList arguments, OptionSet detectedOptions ) {
  if ( arguments.hasMore() ) {
    String nextArgument = arguments.peek();
    if ( !parser.looksLikeAnOption( nextArgument ) )
      handleOptionArgument( parser, detectedOptions, arguments );
    else if ( isArgumentOfNumberType() && canConvertArgument( nextArgument ) )
      addArguments( detectedOptions, arguments.next() );
    else
      detectedOptions.add( this );
  }
  else
    detectedOptions.add( this );
}

代码示例来源:origin: io.snappydata/gemfire-util

@Override
protected void detectOptionArgument( OptionParser parser, ArgumentList arguments, OptionSet detectedOptions ) {
  if ( arguments.hasMore() ) {
    String nextArgument = arguments.peek();
    if ( !parser.looksLikeAnOption( nextArgument ) )
      handleOptionArgument( parser, detectedOptions, arguments );
    else if ( isArgumentOfNumberType() && canConvertArgument( nextArgument ) )
      addArguments( detectedOptions, arguments.next() );
    else
      detectedOptions.add( this );
  }
  else
    detectedOptions.add( this );
}

代码示例来源:origin: org.apache.geode/geode-joptsimple

@Override
protected void detectOptionArgument( OptionParser parser, ArgumentList arguments, OptionSet detectedOptions ) {
  if ( arguments.hasMore() ) {
    String nextArgument = arguments.peek();
    if ( !parser.looksLikeAnOption( nextArgument ) )
      handleOptionArgument( parser, detectedOptions, arguments );
    else if ( isArgumentOfNumberType() && canConvertArgument( nextArgument ) )
      addArguments( detectedOptions, arguments.next() );
    else
      detectedOptions.add( this );
  }
  else
    detectedOptions.add( this );
}

代码示例来源:origin: net.sf.jopt-simple/jopt-simple

@Override
protected void detectOptionArgument( OptionParser parser, ArgumentList arguments, OptionSet detectedOptions ) {
  if ( arguments.hasMore() ) {
    String nextArgument = arguments.peek();
    if ( !parser.looksLikeAnOption( nextArgument ) && canConvertArgument( nextArgument ) )
      handleOptionArgument( parser, detectedOptions, arguments );
    else if ( isArgumentOfNumberType() && canConvertArgument( nextArgument ) )
      addArguments( detectedOptions, arguments.next() );
    else
      detectedOptions.add( this );
  }
  else
    detectedOptions.add( this );
}

代码示例来源:origin: jopt-simple/jopt-simple

@Override
protected void detectOptionArgument( OptionParser parser, ArgumentList arguments, OptionSet detectedOptions ) {
  if ( arguments.hasMore() ) {
    String nextArgument = arguments.peek();
    if ( !parser.looksLikeAnOption( nextArgument ) && canConvertArgument( nextArgument ) )
      handleOptionArgument( parser, detectedOptions, arguments );
    else if ( isArgumentOfNumberType() && canConvertArgument( nextArgument ) )
      addArguments( detectedOptions, arguments.next() );
    else
      detectedOptions.add( this );
  }
  else
    detectedOptions.add( this );
}

代码示例来源:origin: jopt-simple/jopt-simple

/**
 * Parses the given command line arguments according to the option specifications given to the parser.
 *
 * @param arguments arguments to parse
 * @return an {@link OptionSet} describing the parsed options, their arguments, and any non-option arguments found
 * @throws OptionException if problems are detected while parsing
 * @throws NullPointerException if the argument list is {@code null}
 */
public OptionSet parse( String... arguments ) {
  ArgumentList argumentList = new ArgumentList( arguments );
  OptionSet detected = new OptionSet( recognizedOptions.toJavaUtilMap() );
  detected.add( recognizedOptions.get( NonOptionArgumentSpec.NAME ) );
  while ( argumentList.hasMore() )
    state.handleArgument( this, argumentList, detected );
  reset();
  ensureRequiredOptions( detected );
  ensureAllowedOptions( detected );
  return detected;
}

代码示例来源:origin: net.sf.jopt-simple/jopt-simple

/**
 * Parses the given command line arguments according to the option specifications given to the parser.
 *
 * @param arguments arguments to parse
 * @return an {@link OptionSet} describing the parsed options, their arguments, and any non-option arguments found
 * @throws OptionException if problems are detected while parsing
 * @throws NullPointerException if the argument list is {@code null}
 */
public OptionSet parse( String... arguments ) {
  ArgumentList argumentList = new ArgumentList( arguments );
  OptionSet detected = new OptionSet( recognizedOptions.toJavaUtilMap() );
  detected.add( recognizedOptions.get( NonOptionArgumentSpec.NAME ) );
  while ( argumentList.hasMore() )
    state.handleArgument( this, argumentList, detected );
  reset();
  ensureRequiredOptions( detected );
  ensureAllowedOptions( detected );
  return detected;
}

相关文章