public class UnsupportedProduct extends Object implements ProductInterface, AnalyticProductInterface, Serializable
getValue
method is called.
This class can be used to created products trigger an exception only upon valuation (i.e., late).Constructor and Description |
---|
UnsupportedProduct(Exception exception)
Creates an unsupported product throwing an exception if its
getValue method is called. |
Modifier and Type | Method and Description |
---|---|
double |
getValue(double evaluationTime,
AnalyticModelInterface model)
Return the valuation of the product using the given model.
|
Object |
getValue(double evaluationTime,
ModelInterface model)
Return the valuation of the product using the given model.
|
String |
toString() |
public UnsupportedProduct(Exception exception)
getValue
method is called.exception
- The exception to be thrown if this product is evaluated.public Object getValue(double evaluationTime, ModelInterface model)
ProductInterface
getValue
in interface ProductInterface
evaluationTime
- The evaluation time as double. Cash flows prior and including this time are not considered.model
- The model under which the product is valued.public double getValue(double evaluationTime, AnalyticModelInterface model)
AnalyticProductInterface
AnalyticModelInterface
.getValue
in interface AnalyticProductInterface
evaluationTime
- The evaluation time as double. Cash flows prior and including this time are not considered.model
- The model under which the product is valued.Copyright © 2015. All rights reserved.