import DPJRuntime.*;
/**
* Class for defining the results of a task. Currently, this is simply
* the Monte Carlo generate rate path.
*
* @author H W Yau
* @version $Revision: 1.8 $ $Date: 1999/02/16 18:53:07 $
*/
public class ToResult<region P> implements java.io.Serializable {
private String header in P;
private double expectedReturnRate in P =Double.NaN;
private double volatility in P =Double.NaN;
private double volatility2 in P =Double.NaN;
private double finalStockPrice in P =Double.NaN;
private ArrayDouble<P> pathValue in P;
/**
* Constructor, for the results from a computation.
*
* @param header Simple header string.
* @param pathValue Data computed by the Monte Carlo generator.
*/
public ToResult(String header, double expectedReturnRate, double volatility,
double volatility2, double finalStockPrice, ArrayDouble<P> pathValue) writes P {
this.header=header;
this.expectedReturnRate = expectedReturnRate;
this.volatility = volatility;
this.volatility2 = volatility2;
this.finalStockPrice = finalStockPrice;
this.pathValue = pathValue;
}
/**
* Gives a simple string representation of this object.
*
* @return String representation of this object.
*/
public String toString() reads P {
return(header);
}
//------------------------------------------------------------------------
// Accessor methods for class ToResult.
// Generated by 'makeJavaAccessor.pl' script. HWY. 20th January 1999.
//------------------------------------------------------------------------
/**
* Accessor method for private instance variable <code>header</code>.
*
* @return Value of instance variable <code>header</code>.
*/
public String get_header() reads P {
return(this.header);
}
/**
* Set method for private instance variable <code>header</code>.
*
* @param header the value to set for the instance variable <code>header</code>.
*/
public void set_header(String header) writes P {
this.header = header;
}
/**
* Accessor method for private instance variable <code>expectedReturnRate</code>.
*
* @return Value of instance variable <code>expectedReturnRate</code>.
*/
public double get_expectedReturnRate() reads P {
return(this.expectedReturnRate);
}
/**
* Set method for private instance variable <code>expectedReturnRate</code>.
*
* @param expectedReturnRate the value to set for the instance variable
* <code>expectedReturnRate</code>.
*/
public void set_expectedReturnRate(double expectedReturnRate) writes P {
this.expectedReturnRate = expectedReturnRate;
}
/**
* Accessor method for private instance variable <code>volatility</code>.
*
* @return Value of instance variable <code>volatility</code>.
*/
public double get_volatility() reads P {
return(this.volatility);
}
/**
* Set method for private instance variable <code>volatility</code>.
*
* @param volatility the value to set for the instance variable <code>volatility</code>.
*/
public void set_volatility(double volatility) writes P {
this.volatility = volatility;
}
/**
* Accessor method for private instance variable <code>volatility2</code>.
*
* @return Value of instance variable <code>volatility2</code>.
*/
public double get_volatility2() reads P {
return(this.volatility2);
}
/**
* Set method for private instance variable <code>volatility2</code>.
*
* @param volatility2 the value to set for the instance variable <code>volatility2</code>.
*/
public void set_volatility2(double volatility2) writes P {
this.volatility2 = volatility2;
}
/**
* Accessor method for private instance variable <code>finalStockPrice</code>.
*
* @return Value of instance variable <code>finalStockPrice</code>.
*/
public double get_finalStockPrice() reads P {
return(this.finalStockPrice);
}
/**
* Set method for private instance variable <code>finalStockPrice</code>.
*
* @param finalStockPrice the value to set for the instance variable
* <code>finalStockPrice</code>.
*/
public void set_finalStockPrice(double finalStockPrice) writes P {
this.finalStockPrice = finalStockPrice;
}
/**
* Accessor method for private instance variable <code>pathValue</code>.
*
* @return Value of instance variable <code>pathValue</code>.
*/
public ArrayDouble<P> get_pathValue() reads P {
return(this.pathValue);
}
/**
* Set method for private instance variable <code>pathValue</code>.
*
* @param pathValue the value to set for the instance variable <code>pathValue</code>.
*/
public void set_pathValue(ArrayDouble<P> pathValue) writes P {
this.pathValue = pathValue;
}
//------------------------------------------------------------------------
}