madkit.kernel

## Enum Madkit.BooleanOption

- java.lang.Object
- - java.lang.Enum<Madkit.BooleanOption>
  - - madkit.kernel.Madkit.BooleanOption

- All Implemented Interfaces:
    Serializable, Comparable<Madkit.BooleanOption>, MadkitOption
  Enclosing class:
    Madkit

      public static enum Madkit.BooleanOption
      extends Enum<Madkit.BooleanOption>
      implements MadkitOption

  Option used to activate or disable features on startup. These options can be used from the command line or using the main method of MaDKit.

       SYNOPSIS

  `--optionName` [true|false]

       DESCRIPTION

  If no boolean value is specified, the option is considered as being set to true.

       EXAMPLES

  - --optionName false
  - --optionName (equivalent to)
  - --optionName true
  Since:
    MaDKit 5
  Version:
    0.9
  Author:
    Fabien Michel

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `autoConnectMadkitWebsite` Connect to the MaDKit repository on startup.
    `console` Launches the `ConsoleAgent` before any other.
    `createLogFiles` If activated, MaDKit will create a log file for every agent which has a log level greater than `Level.OFF`.
    `desktop` Starts the desktop mode.
    `loadLocalDemos` Loads all the jar files which are in the demos directory on startup.
    `network` Starts the network on startup.
    `noAgentConsoleLog` Defines if agent logging should be quiet in the default console.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isActivated(Properties session)` Tells if this option is activated for this session.
    `String` | `toString()` Returns the constant's name prefixed by "`--`" so that it could interpreted as an option of the command line or in `Madkit.Madkit(String...)`.
    `static Madkit.BooleanOption` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static Madkit.BooleanOption[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface madkit.kernel.MadkitOption

      `name`

- - ### Enum Constant Detail

    - #### desktop

          public static final Madkit.BooleanOption desktop

      Starts the desktop mode. Default value is "false". Still, if this property is not explicitly set to "false" and if `Madkit.Option.launchAgents` and `Madkit.Option.configFile` are both `null`, then the desktop mode will be automatically set to `true` during startup.

    - #### autoConnectMadkitWebsite

          public static final Madkit.BooleanOption autoConnectMadkitWebsite

      Connect to the MaDKit repository on startup. Default value is "false".

    - #### network

          public static final Madkit.BooleanOption network

      Starts the network on startup. Default value is "false".

    - #### createLogFiles

          public static final Madkit.BooleanOption createLogFiles

      If activated, MaDKit will create a log file for every agent which has a log level greater than `Level.OFF`. Default value is "false".
      See Also:
        `Madkit.Option.logDirectory`

    - #### noAgentConsoleLog

          public static final Madkit.BooleanOption noAgentConsoleLog

      Defines if agent logging should be quiet in the default console. Default value is "false".

    - #### console

          public static final Madkit.BooleanOption console

      Launches the `ConsoleAgent` before any other.

    - #### loadLocalDemos

          public static final Madkit.BooleanOption loadLocalDemos

      Loads all the jar files which are in the demos directory on startup. Default value is "false".

  - ### Method Detail

    - #### values

          public static Madkit.BooleanOption[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (Madkit.BooleanOption c : Madkit.BooleanOption.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static Madkit.BooleanOption valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### isActivated

          public boolean isActivated(Properties session)

      Tells if this option is activated for this session.
      Parameters:
        `session` -
      Returns:
        `true` if this boolean option is set to `true` for this config

    - #### toString

          public String toString()

      Returns the constant's name prefixed by "`--`" so that it could interpreted as an option of the command line or in `Madkit.Madkit(String...)`.
      Specified by:
        `toString` in interface `MadkitOption`
      Overrides:
        `toString` in class `Enum<Madkit.BooleanOption>`
      Returns:
        The command line form for this option, with -- in front of the option's name, i.e. `--optionName`

Fabien Michel, Olivier Gutknecht, Jacques Ferber - September 27 2016