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 itsgetValue
method is called. -
Method Summary
Modifier and TypeMethodDescriptiondouble
getValue(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 itsgetValue
method is called.- Parameters:
exception
- The exception to be thrown if this product is evaluated.
-
-
Method Details
-
getValue
Description copied from interface:Product
Return 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:AnalyticProduct
Return the valuation of the product using the given model. The model has to implement the modes ofAnalyticModel
.- Specified by:
getValue
in 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:Product
Return 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
-