Example usage for io.vertx.core.cli CommandLine isFlagEnabled

List of usage examples for io.vertx.core.cli CommandLine isFlagEnabled

Introduction

In this page you can find the example usage for io.vertx.core.cli CommandLine isFlagEnabled.

Prototype

boolean isFlagEnabled(String name);

Source Link

Document

Gets the value of an option marked as a flag.

Usage

From source file:examples.cli.CLIExamples.java

License:Open Source License

public void example8(CLI cli, List<String> userCommandLineArguments) {
    CommandLine commandLine = cli.parse(userCommandLineArguments);
    String opt = commandLine.getOptionValue("my-option");
    boolean flag = commandLine.isFlagEnabled("my-flag");
    String arg0 = commandLine.getArgumentValue(0);
}