本文整理了Java中joptsimple.OptionSet.add()
方法的一些代码示例,展示了OptionSet.add()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OptionSet.add()
方法的具体详情如下:
包路径:joptsimple.OptionSet
类名称: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;
}
内容来源于网络,如有侵权,请联系作者删除!