- All Known Implementing Classes:
CommandBase,FutureCommand,SimpleCommand
public interface Command<T>
Represents a command that encapsulates an operation and its preconditions.
-
Property Summary
Properties Type Property Description ReadOnlyBooleanPropertyexecutableGets a property that indicates whether the command is currently executable.ReadOnlyBooleanPropertyexecutingGets a property that indicates whether the command is currently executing. -
Method Summary
Modifier and Type Method Description ReadOnlyBooleanPropertyexecutableProperty()Gets a property that indicates whether the command is currently executable.voidexecute(T parameter)Executes the command.ReadOnlyBooleanPropertyexecutingProperty()Gets a property that indicates whether the command is currently executing.default booleanisExecutable()Indicates whether the command is currently executable.default booleanisExecuting()Indicates whether the command is currently executing.
-
Property Details
-
executable
ReadOnlyBooleanProperty executablePropertyGets a property that indicates whether the command is currently executable.- See Also:
isExecutable()
-
executing
ReadOnlyBooleanProperty executingPropertyGets a property that indicates whether the command is currently executing.- See Also:
isExecuting()
-
-
Method Details
-
executableProperty
ReadOnlyBooleanProperty executableProperty()Gets a property that indicates whether the command is currently executable.- See Also:
isExecutable()
-
executingProperty
ReadOnlyBooleanProperty executingProperty()Gets a property that indicates whether the command is currently executing.- See Also:
isExecuting()
-
isExecutable
default boolean isExecutable()Indicates whether the command is currently executable. -
isExecuting
default boolean isExecuting()Indicates whether the command is currently executing. -
execute
Executes the command.- Parameters:
parameter- the parameter that is passed to the command implementation- Throws:
IllegalStateException- if the command is not executable
-