Class YesNoValueHandler


@ClassVersion(sourceVersion="$Id: YesNoValueHandler.java 1078 2023-10-19 14:39:47Z tquadrat $") @API(status=STABLE, since="0.0.1") public final class YesNoValueHandler extends SimpleCmdLineValueHandler<Boolean>
An implementation of CmdLineValueHandler for boolean and Boolean values that does accept also "yes", "qui", "ja", "sí", "sì", "да", "sim", "tak" and more as true. Still any other phrase and null are taken as false.
Author:
Thomas Thrien (thomas.thrien@tquadrat.org)
Version:
$Id: YesNoValueHandler.java 1078 2023-10-19 14:39:47Z tquadrat $
Since:
0.0.1
UML Diagram
UML Diagram for "org.tquadrat.foundation.config.cli.YesNoValueHandler"

UML Diagram for "org.tquadrat.foundation.config.cli.YesNoValueHandler"

UML Diagram for "org.tquadrat.foundation.config.cli.YesNoValueHandler"
  • Constructor Details

    • YesNoValueHandler

      public YesNoValueHandler(CLIDefinition context, BiConsumer<String,Boolean> valueSetter)
      Creates a new YesNoValueHandler instance.
      Parameters:
      context - The CLI definition that provides the context for this value handler.
      valueSetter - The function that places the translated value to the property.
    • YesNoValueHandler

      Creates a new YesNoValueHandler instance.
      Parameters:
      valueSetter - The function that places the translated value to the property.