Top Description Fields Constructors Methods
io.vertx.core.cli.converters

public final Class BooleanConverter

extends Object
implements Converter<Boolean>
Class Inheritance
All Implemented Interfaces
io.vertx.core.cli.converters.Converter
Imports
java.util.Arrays, .List

A converter for boolean. This converter considered as 'true' : "true", "on", "1", "yes". All other values are considered as 'false' (as a consequence, 'null' is considered as 'false').
Author
Clement Escoffier

Field Summary

Modifier and TypeField and Description
public static final BooleanConverter
INSTANCE

The converter.

private static final List<String>
TRUE

The set of values considered as 'true'.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public Boolean

Returns:

the boolean object
fromString
(String
the value
value
)

Implements io.vertx.core.cli.converters.Converter.fromString.

Creates the boolean value from the given String.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final BooleanConverter INSTANCE

The converter.

TRUEback to summary
private static final List<String> TRUE

The set of values considered as 'true'.

Constructor Detail

BooleanConverterback to summary
private BooleanConverter()

Method Detail

fromStringback to summary
public Boolean fromString(String value)

Implements io.vertx.core.cli.converters.Converter.fromString.

Creates the boolean value from the given String. If the given String does not match one of the 'true' value, false is returned.

Parameters
value:String

the value

Returns:Boolean

the boolean object

Annotations
@Override