Package madkit.kernel

# Enum Class Madkit.BooleanOption

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

All Implemented Interfaces:
  `Serializable`, `Comparable<Madkit.BooleanOption>`, `java.lang.constant.Constable`, `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

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `autoConnectMadkitWebsite`
  Connect to the MaDKit repository on startup.
  `cgrWarnings`
  activates CGR warnings for the logging of the agents. see `AgentLogger.enableCGRWarnings()`
  `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`.
  `debug`
  Activates the debug mode so that all agents' log levels are set to `Level.ALL`
  `desktop`
  Starts the desktop mode.
  `loadLocalDemos`
  Loads on startup all the jar files found in a "demos" directory placed in the working directory.
  `network`
  Starts the network on startup.
  `noAgentConsoleLog`
  Defines if agent logging should be quiet in the default console.

- ## Method Summary

  Modifier and Type
  Method
  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(String...)`.
  `static Madkit.BooleanOption`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static Madkit.BooleanOption[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

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

  `clone, compareTo, describeConstable, 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 Details

  - ### 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.

  - ### debug

    public static final Madkit.BooleanOption debug
    Activates the debug mode so that all agents' log levels are set to `Level.ALL`

  - ### 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 on startup all the jar files found in a "demos" directory placed in the working directory. Default value is "false".

  - ### cgrWarnings

    public static final Madkit.BooleanOption cgrWarnings
    activates CGR warnings for the logging of the agents. see `AgentLogger.enableCGRWarnings()`
    See Also:
      - `AgentLogger`

- ## Method Details

  - ### values

    public static Madkit.BooleanOption[] values()
    Returns an array containing the constants of this enum class, in the order they are declared.
    Returns:
      an array containing the constants of this enum class, in the order they are declared

  - ### valueOf

    public static Madkit.BooleanOption valueOf(String name)
    Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class 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(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`