Package net.splitcells.dem
Class Dem
- java.lang.Object
-
- net.splitcells.dem.Dem
-
public class Dem extends Object
This is the starting point of all process definitions. For a process it defines the program that is executed and the environment in which it is executed. One of the main goals is to make the environment of a program as side effect free as possible. This framework does not try to enforce freedom of side effects on the language level, as this is not possible. It just gives tools in order to minimize side effects. This is done, by having 1 and only one variable representing the state of the environment and passing it through everywhere.
-
-
Constructor Summary
Constructors Constructor Description Dem()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ConfigurationV
config()
This function makes the explicit usage ofDem
easier, by providing a name for the most regularly used functionality, that can be guessed.static <T> T
configValue(Class<? extends Option<T>> key)
static EnvironmentV
ensuredInitialized()
static EnvironmentV
ensuredInitialized(Consumer<Environment> configurator)
Deprecated.static EnvironmentV
environment()
TODO If the user does not care, how it is initialized he does not care about output.static ProcessResult
process(Runnable program)
static ProcessResult
process(Runnable program, Consumer<Environment> configurator)
Defines and executes a program.
-
-
-
Method Detail
-
process
public static ProcessResult process(Runnable program)
-
process
public static ProcessResult process(Runnable program, Consumer<Environment> configurator)
Defines and executes a program.TODO Support stacking.
TODO Support cactus stacking.
-
ensuredInitialized
@Deprecated public static EnvironmentV ensuredInitialized(Consumer<Environment> configurator)
Deprecated.
-
ensuredInitialized
public static EnvironmentV ensuredInitialized()
-
environment
public static EnvironmentV environment()
TODO If the user does not care, how it is initialized he does not care about output. But this only is true for certain output. Logging level should be WARNING by default.
-
config
public static ConfigurationV config()
This function makes the explicit usage ofDem
easier, by providing a name for the most regularly used functionality, that can be guessed.- Returns:
- The Configuration Of The Current Environment
-
-