edu.unm.cs.cs351.tdrl.f07.p2
Interface CIT<S>


public interface CIT<S>

A Customer Information Token represents everything that Grell Computers knows about a specific customer's order.

Version:
1.0
Author:
terran

Method Summary
 int getArrivalTime()
           
 int getCustomerID()
           
 CustomerType getCustomerType()
           
 ComputerOrder getOrder()
          Specifies the kind of computer that is being ordered.
 OrderReceipt<S> getPrevTransactionReceipt()
          This field allows this CIT to specify a change to an existing order.
 boolean isCancellation()
          Specifies whether this is a cancellation of a previously existing order.
 

Method Detail

getCustomerID

int getCustomerID()

getCustomerType

CustomerType getCustomerType()

getArrivalTime

int getArrivalTime()

getOrder

ComputerOrder getOrder()
Specifies the kind of computer that is being ordered. This field returns the kind of computer that the user is requesting. If this is a new order, then this is the kind of computer that needs to be built. If this is a change order, then this specifies what the customer wants now; the previously existing order type should be abandoned and replaced with this new order type. If this CIT is a cancellation order, then getOrder is meaningless and should be ignored.

Returns:
Type of computer that the customer wants.

getPrevTransactionReceipt

OrderReceipt<S> getPrevTransactionReceipt()
This field allows this CIT to specify a change to an existing order. If this is a new order, then this returns null. Otherwise, it returns the receipt that was previously generated by the plant when the order was first established.

Returns:
null if this is a new order; otherwise the receipt from a previous order, if this is a change order.

isCancellation

boolean isCancellation()
Specifies whether this is a cancellation of a previously existing order. If it is, then the previous order can be identified via getPrevTransactionReceipt().

Returns:
true iff this is a cancellation of a standing order.