io.vertx.core.cli.converters

## Class BooleanConverter

- java.lang.Object
- - io.vertx.core.cli.converters.BooleanConverter

- All Implemented Interfaces:
    Converter<Boolean>

      public final class BooleanConverter
      extends Object
      implements Converter<Boolean>

  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

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static BooleanConverter` | `INSTANCE` The converter.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Boolean` | `fromString(String value)` Creates the boolean value from the given String.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### INSTANCE

          public static final BooleanConverter INSTANCE

      The converter.

  - ### Method Detail

    - #### fromString

          public Boolean fromString(String value)

      Creates the boolean value from the given String. If the given String does not match one of the 'true' value, `false` is returned.
      Specified by:
        `fromString` in interface `Converter<Boolean>`
      Parameters:
        `value` - the value
      Returns:
        the boolean object

Copyright © 2022 Eclipse. All rights reserved.