home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1997 May / PCO_5_97.ISO / FilesBBS / OS2 / CSIME.ARJ / CSIME.ZIP / csime / mug / app / Command.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-02-09  |  576 b   |  24 lines

  1. package mug.app;
  2.  
  3. public abstract class Command {
  4.    private Command _next;
  5.  
  6.    public abstract void execute();
  7.  
  8.    public Command setNext(Command var1) {
  9.       this._next = var1;
  10.       return this;
  11.    }
  12.  
  13.    protected void executeNext() {
  14.       if (this._next != null) {
  15.          this._next.execute();
  16.       }
  17.  
  18.    }
  19.  
  20.    protected void executeNext(Command var1) {
  21.       var1.setNext(this._next).execute();
  22.    }
  23. }
  24.