Subversion Repositories HomeAutomation

Rev

Blame | Last modification | View Log | SVN | RSS feed

  1. /*
  2.  * File created by Jimmy
  3.  * at 2004-jun-09 18:52:31
  4.  */
  5. package Macbeth.System;
  6.  
  7. /**
  8.  * This class represents a Macbeth Action, that is an action
  9.  * that can be performed by the system.
  10.  *
  11.  * @author Jimmy
  12.  */
  13. public class MbAction {
  14.  
  15.     //the action string (OWNER.ACTIONNAME)
  16.     private String actionString;
  17.     //the action parameters (comma-separated)
  18.     private String parameters;
  19.  
  20.     /**
  21.      * Creates a new instance of MbAction.
  22.      *
  23.      * @param name The actionString of the action.
  24.      * @param parameters The action parameters.
  25.      */
  26.     public MbAction(String name, String parameters) {
  27.         this.actionString = name;
  28.         this.parameters = parameters;
  29.     }
  30.  
  31.     /**
  32.      * Creates a new instance of MbAction.
  33.      */
  34.     public MbAction() {
  35.         this(null, null);
  36.     }
  37.  
  38.     public String getActionString() {
  39.         return actionString;
  40.     }
  41.  
  42.     public String getParameters() {
  43.         return parameters;
  44.     }
  45.  
  46.     public String toString() {
  47.         return actionString + "(" + parameters + ")";
  48.     }
  49.  
  50. }
  51.