热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

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

本文整理了Java中joptsimple.OptionSet.hasOptions()方法的一些代码示例,展示了OptionSet.hasOptions()

本文整理了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);

推荐阅读
author-avatar
mobiledu2502860983
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有