reservation
Class Command

java.lang.Object
  extended byreservation.Command
All Implemented Interfaces:
Mode

public class Command
extends java.lang.Object
implements Mode

This class hold Command structure. This object analyse the instruction written by the user and determine according to the first element the command to execute. Then it instancie a new object which depends to the command and which will execute the instruction of the user.

Author:
Texier Mathieu and Frederic Bidon

Field Summary
 
Fields inherited from interface reservation.Mode
DEBUG, HIGH, NORMAL, QUIET
 
Constructor Summary
Command()
          Creates a new instance of Command
Command(java.io.BufferedReader in, int VerboseMode)
          Take over the instruction written by the user and also if it want execute the command in Verbose Mode
 
Method Summary
 void process()
          This method determine the number of element of the user's instruction and analyse the first element of this one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Command

public Command()
Creates a new instance of Command


Command

public Command(java.io.BufferedReader in,
               int VerboseMode)
Take over the instruction written by the user and also if it want execute the command in Verbose Mode

Parameters:
in - The input stream from which the data are interpreted
VerboseMode - the verbosity level (QUIET, NORMAL, DEBUG)
Method Detail

process

public void process()
This method determine the number of element of the user's instruction and analyse the first element of this one. If it corresponds to an available command of the system, it create a new object depending of the command. This new object will execute the instruction with the other elements of the command.

Specified by:
process in interface Mode