- java.lang.Object
-
- io.github.interacto.command.CommandImpl
-
- io.github.interacto.command.library.InstrumentCommand
-
- All Implemented Interfaces:
Command
- Direct Known Subclasses:
ActivateInstrument,InactivateInstrument
public abstract class InstrumentCommand extends CommandImpl
This command manipulates an instrument.- Author:
- Arnaud Blouin
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.github.interacto.command.Command
Command.CmdStatus, Command.RegistrationPolicy
-
-
Field Summary
Fields Modifier and Type Field Description protected Instrument<?>instrumentThe manipulated instrument.-
Fields inherited from class io.github.interacto.command.CommandImpl
status
-
-
Constructor Summary
Constructors Constructor Description InstrumentCommand(Instrument<?> instrument)Creates the command.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanDo()Checks whether the command can be executed.-
Methods inherited from class io.github.interacto.command.CommandImpl
cancel, createMemento, doCmdBody, doIt, done, flush, getRegistrationPolicy, getStatus, hadEffect, isDone, toString, unregisteredBy
-
-
-
-
Field Detail
-
instrument
protected final Instrument<?> instrument
The manipulated instrument.
-
-
Constructor Detail
-
InstrumentCommand
public InstrumentCommand(Instrument<?> instrument)
Creates the command.- Parameters:
instrument- The instrument to handle.
-
-
Method Detail
-
canDo
public boolean canDo()
Description copied from interface:CommandChecks whether the command can be executed.- Specified by:
canDoin interfaceCommand- Overrides:
canDoin classCommandImpl- Returns:
- True if the command can be executed.
-
-