作者:mobiledu2502860983 | 来源:互联网 | 2023-09-17 19:43
本文整理了Java中joptsimple.OptionSet.hasOptions()
方法的一些代码示例,展示了OptionSet.hasOptions()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OptionSet.hasOptions()
方法的具体详情如下:
包路径:joptsimple.OptionSet
类名称:OptionSet
方法名:hasOptions
OptionSet.hasOptions介绍
[英]Tells whether any options were detected.
[中]说明是否检测到任何选项。
代码示例
代码示例来源:origin: bullet-db/bullet-storm
/**
* Main. Launches a remote Storm topology.
* @param args The input args.
* @throws Exception if any.
*/
public static void main(String[] args) throws Exception {
OptionSet optiOns= PARSER.parse(args);
if (!options.hasOptions() || options.has(HELP_ARG) || !options.has(SPOUT_ARG)) {
System.out.println("If you are looking to connect your existing topology to Bullet, you should compile");
System.out.println("in the Bullet jar and use the submit method in the StormUtils class to wire up Bullet");
System.out.println("to the tail end of your topology that produces BulletRecords. If you are simply");
System.out.println("looking to connect a Spout class that implements IRichSpout and emits BulletRecords,");
System.out.println("use the main class directly with the arguments below.");
PARSER.printHelpOn(System.out);
return;
}
String spoutClass = (String) options.valueOf(SPOUT_ARG);
List arguments = (List) options.valuesOf(ARGUMENT_ARG);
Integer parallelism = (Integer) options.valueOf(PARALLELISM_ARG);
Double cpuLoad = (Double) options.valueOf(CPU_LOAD_ARG);
Double OnHeapMemoryLoad= (Double) options.valueOf(ON_HEAP_MEMORY_LOAD_ARG);
Double offHeapMemoryLoad = (Double) options.valueOf(OFF_HEAP_MEMORY_LOAD_ARG);
String yamlPath = (String) options.valueOf(CONFIGURATION_ARG);
BulletStormConfig cOnfig= new BulletStormConfig(yamlPath);
log.info(config.toString());
StormUtils.submit(spoutClass, arguments, config, parallelism, cpuLoad, onHeapMemoryLoad, offHeapMemoryLoad);
}
}
代码示例来源:origin: com.paypal.butterfly/butterfly-cli
if (optiOnSet== null || optionSet.has(CLI_OPTION_HELP) || (!optionSet.hasOptions() && optionSet.nonOptionArguments() == null)){
logger.info("");
logger.info("Usage:\t butterfly [options] [application folder]");
代码示例来源:origin: USPTO/PatentPublicData
if (!options.hasOptions()) {
parser.printHelpOn(System.out);
System.exit(1);
代码示例来源:origin: USPTO/PatentPublicData
if (!options.hasOptions()) {
parser.printHelpOn(System.out);
System.exit(1);
代码示例来源:origin: USPTO/PatentPublicData
if (!options.hasOptions()) {
parser.printHelpOn(System.out);
System.exit(1);
代码示例来源:origin: liveontologies/elk-reasoner
if (!options.hasOptions() || options.has(help)) {
parser.printHelpOn(System.out);
return;
代码示例来源:origin: org.semanticweb.elk/elk-cli
if (!options.hasOptions() || options.has(help)) {
parser.printHelpOn(System.out);
return;
代码示例来源:origin: USPTO/PatentPublicData
if (!options.hasOptions()) {
parser.printHelpOn(System.out);
System.exit(1);
代码示例来源:origin: USPTO/PatentPublicData
if (!options.hasOptions()) {
parser.printHelpOn(System.out);
System.exit(1);