Class InstrumentCommand

    • Field Detail

      • instrument

        protected Instrument<?> instrument
        The manipulated instrument.
    • Constructor Detail

      • InstrumentCommand

        public InstrumentCommand()
        Creates the command.
      • InstrumentCommand

        public InstrumentCommand​(Instrument<?> instrument)
    • Method Detail

      • flush

        public void flush()
        Description copied from interface: Command
        Flushes the command. Can be useful to close streams, free objects, etc. A command should flushed manually only when it is not managed by the cmd registry of the application. When a command is gathered and managed by a command registry, it is automatically flushed when the command registry removes the cmd.
        Specified by:
        flush in interface Command
        Overrides:
        flush in class CommandImpl
      • canDo

        public boolean canDo()
        Description copied from interface: Command
        Checks whether the command can be executed.
        Specified by:
        canDo in interface Command
        Overrides:
        canDo in class CommandImpl
        Returns:
        True if the command can be executed.
      • getInstrument

        public Instrument<?> getInstrument()
        Returns:
        The manipulated instrument.
      • setInstrument

        public void setInstrument​(Instrument<?> newInstrument)
        Sets the manipulated instrument.
        Parameters:
        newInstrument - The manipulated instrument.