Package madkit.kernel
Enum Class Madkit.BooleanOption
- All Implemented Interfaces:
Serializable
,Comparable<Madkit.BooleanOption>
,java.lang.constant.Constable
,MadkitOption
- Enclosing class:
- Madkit
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]
DESCRIPTIONIf 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 ConstantsEnum ConstantDescriptionConnect to the MaDKit repository on startup.activates CGR warnings for the logging of the agents. seeAgentLogger.enableCGRWarnings()
Launches theConsoleAgent
before any other.If activated, MaDKit will create a log file for every agent which has a log level greater thanLevel.OFF
.Activates the debug mode so that all agents' log levels are set toLevel.ALL
Starts the desktop mode.Loads on startup all the jar files found in a "demos" directory placed in the working directory.Starts the network on startup.Defines if agent logging should be quiet in the default console. -
Method Summary
Modifier and TypeMethodDescriptionboolean
isActivated
(Properties session) Tells if this option is activated for this session.toString()
Returns the constant's name prefixed by "--
" so that it could interpreted as an option of the command line or inMadkit(String...)
.static Madkit.BooleanOption
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 interface madkit.kernel.MadkitOption
name
-
Enum Constant Details
-
desktop
Starts the desktop mode. Default value is "false". Still, if this property is not explicitly set to "false" and ifMadkit.Option.launchAgents
andMadkit.Option.configFile
are bothnull
, then the desktop mode will be automatically set totrue
during startup. -
debug
Activates the debug mode so that all agents' log levels are set toLevel.ALL
-
autoConnectMadkitWebsite
Connect to the MaDKit repository on startup. Default value is "false". -
network
Starts the network on startup. Default value is "false". -
createLogFiles
If activated, MaDKit will create a log file for every agent which has a log level greater thanLevel.OFF
. Default value is "false".- See Also:
-
noAgentConsoleLog
Defines if agent logging should be quiet in the default console. Default value is "false". -
console
Launches theConsoleAgent
before any other. -
loadLocalDemos
Loads on startup all the jar files found in a "demos" directory placed in the working directory. Default value is "false". -
cgrWarnings
activates CGR warnings for the logging of the agents. seeAgentLogger.enableCGRWarnings()
- See Also:
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
isActivated
Tells if this option is activated for this session.- Parameters:
session
-- Returns:
true
if this boolean option is set totrue
for this config
-
toString
Returns the constant's name prefixed by "--
" so that it could interpreted as an option of the command line or inMadkit(String...)
.- Specified by:
toString
in interfaceMadkitOption
- Overrides:
toString
in classEnum<Madkit.BooleanOption>
- Returns:
- The command line form for this option, with -- in front of
the option's name, i.e.
--optionName
-