java.lang.Object
net.finmath.modelling.UnsupportedProduct
- All Implemented Interfaces:
Serializable,AnalyticProduct,Product
A product throwing an exception if its
getValue method is called.
This class can be used to created products trigger an exception only upon valuation (i.e., late).- Version:
- 1.0
- Author:
- Christian Fries
- See Also:
- Serialized Form
-
Constructor Summary
ConstructorsConstructorDescriptionUnsupportedProduct(Exception exception)Creates an unsupported product throwing an exception if itsgetValuemethod is called. -
Method Summary
Modifier and TypeMethodDescriptiondoublegetValue(double evaluationTime, AnalyticModel model)Return the valuation of the product using the given model.Return the valuation of the product using the given model.Return the valuation of the product using the given model.toString()
-
Constructor Details
-
UnsupportedProduct
Creates an unsupported product throwing an exception if itsgetValuemethod is called.- Parameters:
exception- The exception to be thrown if this product is evaluated.
-
-
Method Details
-
getValue
Description copied from interface:ProductReturn the valuation of the product using the given model. Implement this method using a checked cast of the model to a derived model for which the product provides a valuation algorithm. Example: an interest rate product requires that the passed model object implements the interface of an interest rate model. Since there is no polymorphism on arguments (see Double Dynamic Dispatch), we reply on a checked cast. -
getValue
Description copied from interface:AnalyticProductReturn the valuation of the product using the given model. The model has to implement the modes ofAnalyticModel.- Specified by:
getValuein interfaceAnalyticProduct- Parameters:
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.- Returns:
- The value of the product using the given model.
-
getValues
Description copied from interface:ProductReturn the valuation of the product using the given model. Implement this method using a checked cast of the model to a derived model for which the product provides a valuation algorithm. Example: an interest rate product requires that the passed model object implements the interface of an interest rate model. Since there is no polymorphism on arguments (see Double Dynamic Dispatch), we reply on a checked cast. -
toString
-