Class Exsecutio<CONTEXT>

java.lang.Object
tsl2.nano.cursus.Exsecutio<CONTEXT>
Type Parameters:
CONTEXT -
All Implemented Interfaces:
ICommand<CONTEXT>, Serializable, Runnable
Direct Known Subclasses:
EExsecutio

public class Exsecutio<CONTEXT> extends Object implements ICommand<CONTEXT>, Serializable
The command that do changes on an instance path. This class should be overwritten to implement specific change commands.
Author:
Tom
See Also:
  • Field Details

    • name

      protected String name
    • mutatio

      protected Mutatio mutatio
    • effectus

      protected List<? extends Effectus> effectus
    • description

      protected String description
  • Constructor Details

    • Exsecutio

      public Exsecutio()
    • Exsecutio

      public Exsecutio(String name, Mutatio mutatio, String description)
  • Method Details

    • run

      public void run()
      Specified by:
      run in interface Runnable
    • getContext

      public CONTEXT getContext()
      Specified by:
      getContext in interface ICommand<CONTEXT>
    • setContext

      public void setContext(CONTEXT context)
      Specified by:
      setContext in interface ICommand<CONTEXT>
    • undo

      public void undo()
      Specified by:
      undo in interface ICommand<CONTEXT>
    • runWith

      public void runWith(IChange... changes)
      Specified by:
      runWith in interface ICommand<CONTEXT>
    • canRunOn

      protected boolean canRunOn(IChange iChange)
      Called before run to perhaps ignore the run...returns true...to be overwritten...
      Parameters:
      iChange -
      Returns:
      true
    • preCheck

      protected void preCheck(IChange iChange)
      Called before run...does nothing...to be overwritten...
      Parameters:
      iChange -
    • postCheck

      protected void postCheck(IChange iChange)
      Called after run...does nothing...to be overwritten...
      Parameters:
      iChange -
    • hasFixedContent

      public boolean hasFixedContent()
    • getMutatio

      public Mutatio getMutatio()
    • getEffectus

      public List<? extends Effectus> getEffectus()
    • getName

      public String getName()
      Specified by:
      getName in interface ICommand<CONTEXT>
    • toString

      public String toString()
      Overrides:
      toString in class Object