edu.rice.comp211.laundry.command
Class DoCommandVisitor

java.lang.Object
  extended by edu.rice.comp211.laundry.command.DoCommandVisitor
All Implemented Interfaces:
CommandVisitor<String>

public class DoCommandVisitor
extends Object
implements CommandVisitor<String>

Processes a command for the stored student reference


Constructor Summary
DoCommandVisitor(Student pStudent)
          Constructor for the class
 
Method Summary
 String forChange(Change cCmd)
          Process a Change command for the student
 String forFold(Fold fCmd)
          Process a Fold command for the student
 String forLaunder(Launder lCmd)
          Process a Launder command for the student
 String forLose(Lose lCmd)
          Process a Lose command for the student
 String forOutfit(Outfit oCmd)
          Process an Outfit command for the student
 String forReceive(Receive rCmd)
          Process a Receive command for the student
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoCommandVisitor

public DoCommandVisitor(Student pStudent)
Constructor for the class

Parameters:
pStudent - the student the command is processing for.
Method Detail

forReceive

public String forReceive(Receive rCmd)
Process a Receive command for the student

Specified by:
forReceive in interface CommandVisitor<String>
Parameters:
rCmd - the command to process
Returns:
a status string describing the processing that took place.

forLose

public String forLose(Lose lCmd)
Process a Lose command for the student

Specified by:
forLose in interface CommandVisitor<String>
Parameters:
lCmd - the command to process
Returns:
a status string describing the processing that took place.

forChange

public String forChange(Change cCmd)
Process a Change command for the student

Specified by:
forChange in interface CommandVisitor<String>
Parameters:
cCmd - the command to process
Returns:
a status string describing the processing that took place.

forLaunder

public String forLaunder(Launder lCmd)
Process a Launder command for the student

Specified by:
forLaunder in interface CommandVisitor<String>
Parameters:
lCmd - the command to process
Returns:
a status string describing the processing that took place.

forFold

public String forFold(Fold fCmd)
Process a Fold command for the student

Specified by:
forFold in interface CommandVisitor<String>
Parameters:
fCmd - the command to process
Returns:
a status string describing the processing that took place.

forOutfit

public String forOutfit(Outfit oCmd)
Process an Outfit command for the student

Specified by:
forOutfit in interface CommandVisitor<String>
Parameters:
oCmd - the command to process
Returns:
a status string describing the outfit the student is currently wearing