Class PredictionObject

java.lang.Object
  extended by PredictionObject

public class PredictionObject
extends java.lang.Object

A PredictionObject stores information about the predictions to be made and then accepts and stores the predictions.


Field Summary
(package private)  java.util.Hashtable componentRFQPrices
           
(package private)  boolean computerPriceNeeded
           
(package private)  java.util.Hashtable computerRFQPrices
           
(package private)  Message[] futureComponentRFQList
           
(package private)  java.util.Hashtable futureComponentRFQPrices
           
(package private)  boolean futureComputerPriceNeeded
           
(package private)  double[] medianPrices
           
(package private) static int numComputers
           
 
Constructor Summary
PredictionObject()
           
 
Method Summary
 double getComponentRFQPrice(int rfqID)
          Allows the parser to read the prediction.
 boolean getComputerPriceNeeded()
          Indicates whether prediction of current computer prices is required today
 double getComputerRFQPrice(int rfqID)
          Allows the parser to read the prediction.
 Message getFutureComponentRFQ(int index)
          Returns an RFQBundle containing a future component RFQ.
 int getFutureComponentRFQCount()
          returns the number of future RFQs for which predictions are required
 double getFutureComponentRFQPrice(int rfqID)
          Allows the parser to read the prediction.
 boolean getFutureComputerPriceNeeded()
          Indicates whether prediction of future computer prices is required today
 double getFutureMedianComputerPrice(int productID)
          Allows the parser to read the prediction.
 void setComponentRFQPrice(int rfqID, double price)
          specify the predicted price that will be offered for the component RFQ
 void setComputerPriceNeeded(boolean b)
          Set by the parser.
 void setComputerRFQPrice(int rfqID, double price)
          specify the predicted price of the resulting computer order (if any)
 void setFutureComponentRFQList(Message[] list)
          Set by the parser.
 void setFutureComponentRFQPrice(int rfqID, double price)
          specify the predicted price that will be offered for the future component RFQ
 void setFutureComputerPriceNeeded(boolean b)
          Set by the parser.
 void setFutureMedianComputerPrice(int productID, double price)
          specify the predicted future median computer price
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numComputers

static final int numComputers
See Also:
Constant Field Values

medianPrices

double[] medianPrices

futureComputerPriceNeeded

boolean futureComputerPriceNeeded

computerPriceNeeded

boolean computerPriceNeeded

futureComponentRFQList

Message[] futureComponentRFQList

computerRFQPrices

java.util.Hashtable computerRFQPrices

componentRFQPrices

java.util.Hashtable componentRFQPrices

futureComponentRFQPrices

java.util.Hashtable futureComponentRFQPrices
Constructor Detail

PredictionObject

public PredictionObject()
Method Detail

setFutureComputerPriceNeeded

public void setFutureComputerPriceNeeded(boolean b)
Set by the parser.


getFutureComputerPriceNeeded

public boolean getFutureComputerPriceNeeded()
Indicates whether prediction of future computer prices is required today


setComputerPriceNeeded

public void setComputerPriceNeeded(boolean b)
Set by the parser.


getComputerPriceNeeded

public boolean getComputerPriceNeeded()
Indicates whether prediction of current computer prices is required today


setFutureMedianComputerPrice

public void setFutureMedianComputerPrice(int productID,
                                         double price)
specify the predicted future median computer price

Parameters:
productID - the ID of the computer
price - the unit price

getFutureMedianComputerPrice

public double getFutureMedianComputerPrice(int productID)
Allows the parser to read the prediction.


setComputerRFQPrice

public void setComputerRFQPrice(int rfqID,
                                double price)
specify the predicted price of the resulting computer order (if any)

Parameters:
productID - the ID of the RFQ
price - the unit price

getComputerRFQPrice

public double getComputerRFQPrice(int rfqID)
Allows the parser to read the prediction.


setFutureComponentRFQList

public void setFutureComponentRFQList(Message[] list)
Set by the parser.


getFutureComponentRFQCount

public int getFutureComponentRFQCount()
returns the number of future RFQs for which predictions are required


getFutureComponentRFQ

public Message getFutureComponentRFQ(int index)
Returns an RFQBundle containing a future component RFQ. The RFQBundle is stored in a Message from the manufacturer to the supplier.


setFutureComponentRFQPrice

public void setFutureComponentRFQPrice(int rfqID,
                                       double price)
specify the predicted price that will be offered for the future component RFQ

Parameters:
productID - the ID of the RFQ
price - the unit price

getFutureComponentRFQPrice

public double getFutureComponentRFQPrice(int rfqID)
Allows the parser to read the prediction.


setComponentRFQPrice

public void setComponentRFQPrice(int rfqID,
                                 double price)
specify the predicted price that will be offered for the component RFQ

Parameters:
productID - the ID of the RFQ
price - the unit price

getComponentRFQPrice

public double getComponentRFQPrice(int rfqID)
Allows the parser to read the prediction.