madkit.kernel

## Enum Madkit.Option

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

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Madkit.Option>, MadkitOption
  Enclosing class:
    Madkit

      public static enum Madkit.Option
      extends java.lang.Enum<Madkit.Option>
      implements MadkitOption

  MaDKit options which are valued with a string representing parameters. These options could be used from the command line or using the main method of MaDKit.
  Since:
    MaDKit 5.0.0.10
  Version:
    0.9
  Author:
    Fabien Michel

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `agentFrameClass` the agent frame class which should be used by the GUI manager, default is `AgentFrame`
    `configFile` Can be used to specify multiple properties at once, using a regular properties file
    `desktopFrameClass` the desktop frame class which should be used, default is `MDKDesktopFrame`
    `i18nDirectory` the directory containing the MDK i18n files
    `launchAgents` Used to launch agents at start up.
    `logDirectory` Used to specify the directory wherein the logs should be done when the `Madkit.BooleanOption.createLogFiles` is activated.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.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.Option` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
    `static Madkit.Option[]` | `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

    - #### launchAgents

          public static final Madkit.Option launchAgents

      Used to launch agents at start up. This option can be used from the command line or using the main method of MaDKit.

           SYNOPSIS

      `--launchAgents` AGENT_CLASS_NAME[,GUI][,NB][;OTHERS]

      - AGENT_CLASS_NAME: the agent class to launch
      - GUI (boolean optional): with a default GUI if `true`
      - NB (integer optional): number of desired instances

           DESCRIPTION

      The optional parameters could be used to (1) launch several different types of agents, (2) launch the agents with a default GUI and/or (3) specify the number of desired instances of each type.

           DEFAULT VALUE

      Default value is "null", meaning that no agent has to be launched.

      Default values for the optional parameters are

      - GUI : `false`
      - NB : 1

           EXAMPLES

      - --launchAgents myPackage.MyAgent
      - --launchAgents myPackage.MyAgent,true
      - --launchAgents myPackage.MyAgent,false,3
      - --launchAgents myPackage.MyAgent;other.OtherAgent
      - --launchAgents myPackage.MyAgent,true;other.OtherAgent,true
      - --launchAgents myPackage.MyAgent;other.OtherAgent,true,3;madkit.kernel.Agent

    - #### logDirectory

          public static final Madkit.Option logDirectory

      Used to specify the directory wherein the logs should be done when the `Madkit.BooleanOption.createLogFiles` is activated.

           SYNOPSIS

      `--logDirectory` DIRECTORY_NAME

           DESCRIPTION

      Specify the desired directory. It could be an absolute or a relative path. At runtime, a log directory named with the current date (second precision) will be created in the log directory for each MaDKit session. E.g. /home/neo/madkit_5/logs/2012.02.23.16.23.53

           DEFAULT VALUE

      Default value is "logs", so that a directory named "logs" will be created in the application working directory.

           EXAMPLES

      - --logDirectory bin
      - --logDirectory /home/neo/madkit_logs
      See Also:
        `Madkit.BooleanOption.createLogFiles`

    - #### desktopFrameClass

          public static final Madkit.Option desktopFrameClass

      the desktop frame class which should be used, default is `MDKDesktopFrame`

    - #### i18nDirectory

          public static final Madkit.Option i18nDirectory

      the directory containing the MDK i18n files

    - #### configFile

          public static final Madkit.Option configFile

      Can be used to specify multiple properties at once, using a regular properties file

    - #### agentFrameClass

          public static final Madkit.Option agentFrameClass

      the agent frame class which should be used by the GUI manager, default is `AgentFrame`

  - ### Method Detail

    - #### values

          public static Madkit.Option[] 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.Option c : Madkit.Option.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.Option valueOf(java.lang.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:
        `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
        `java.lang.NullPointerException` - if the argument is null

    - #### toString

          public java.lang.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 `java.lang.Enum<Madkit.Option>`
      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 - November 18 2014