Enum Class SchedulingAction
- All Implemented Interfaces:
Serializable
,Comparable<SchedulingAction>
,Constable
Enum representing operations which could be done by a
Scheduler
agent. It could
be used by an agent to interact with the scheduler by creating actions using
getActionFrom(Scheduler, Object...)
.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic ActionGroup
createActionGroup
(Scheduler<?> scheduler) Creates an action group for the givenScheduler
agent.Returns the action data corresponding to this enum.getActionFrom
(Scheduler<?> agent, Object... parameters) Builds an FX action that will make the kernel do the corresponding operation if possible.static SchedulingAction
Returns the enum constant of this class with the specified name.static SchedulingAction[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
RUN
Makes the scheduler run the simulation -
STEP
Makes the scheduler do one step of the simulation -
PAUSE
Makes the scheduler pause the simulation -
SHUTDOWN
Makes the scheduler stop the simulation
-
-
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
-
getActionData
Returns the action data corresponding to this enum.- Returns:
- the actionData corresponding to this enum.
-
getActionFrom
Builds an FX action that will make the kernel do the corresponding operation if possible.- Parameters:
agent
- the agent that will send the message to the schedulerparameters
- the parameters to send to the scheduler- Returns:
- the new corresponding action
-
createActionGroup
Creates an action group for the givenScheduler
agent. The action group includes actions for running and pausing the scheduler.- Parameters:
scheduler
- the scheduler agent to create the action group for- Returns:
- the action group corresponding to the given scheduler
-