de.esprit.common.clp

## Class AbstractBooleanOption

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.common.clp.CommandLineOption<java.lang.Boolean>
    - - de.esprit.common.clp.AbstractBooleanOption

- All Implemented Interfaces:
    Dumpable
  Direct Known Subclasses:
    ClientCommandLineParser.OptionAutoLogin, ClientCommandLineParser.OptionAutoReconnect, ClientCommandLineParser.OptionNoMessage, ClientCommandLineParser.OptionZipTransfer, DBToolCommandLineParser.MyOptionSkipErrors, OptionBoolean, OptionShutdown

      public abstract class AbstractBooleanOption
      extends CommandLineOption<java.lang.Boolean>

  This is the base class for boolean option implementations.
  Author:
    Rainer Buesch

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractBooleanOption(java.lang.String option, java.lang.String helpText)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `checkValue()` Performs additional checks on the entered option value (i.e. file existence etc..)
    `java.lang.Boolean` | `getValue()` Returns the parsed value of this option.
    `protected void` | `parseValue(java.lang.String value)` Parses and stores the given value from the command-line to this option.
    `void` | `setDefaultValue(boolean value)`

    - ### Methods inherited from class de.esprit.common.clp.CommandLineOption

      `equals, getArgumentName, getDefaultValue, getEnvVariableName, getEnvVariableValue, getHelpText, getOption, getOptionAndArgument, getStringValue, hasArgument, hashCode, isMandatory, isPrintHelp, isPrintSyntax, isSecret, isValueTakenFromEnvVariable, parseDefaultValue, parseValue, setDefaultValue, setEnvVariableName, setFound, setHelpText, setMandatory, setPrintHelp, setPrintSyntax, setSecret, setStringValue, toDumpString, toString, wasFound`

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toString`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### AbstractBooleanOption

          public AbstractBooleanOption(java.lang.String option,
                               java.lang.String helpText)

  - ### Method Detail

    - #### getValue

          public final java.lang.Boolean getValue()

      Description copied from class: `CommandLineOption`
      Returns the parsed value of this option.
      Specified by:
        `getValue` in class `CommandLineOption<java.lang.Boolean>`

    - #### setDefaultValue

          public final void setDefaultValue(boolean value)

    - #### parseValue

          protected final void parseValue(java.lang.String value)
                                   throws java.lang.Exception

      Description copied from class: `CommandLineOption`
      Parses and stores the given value from the command-line to this option. Subclasses perform any type conversion if necessary.
      Specified by:
        `parseValue` in class `CommandLineOption<java.lang.Boolean>`
      Throws:
        `java.lang.Exception`

    - #### checkValue

          public final void checkValue()
                                throws java.lang.Exception

      Description copied from class: `CommandLineOption`
      Performs additional checks on the entered option value (i.e. file existence etc..) If the option value is null but a defaultValue is defined then the latter is applied. The option may also check its dependencies of other options.
      Overrides:
        `checkValue` in class `CommandLineOption<java.lang.Boolean>`
      Throws:
        `java.lang.Exception`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.