Re: QuantLib-SWING: is it possible to use polymorphism?

Posted by andrea-110 on
URL: http://quantlib.414.s1.nabble.com/QuantLib-SWING-is-it-possible-to-use-polymorphism-tp13142p13150.html

On 19/10/09 10:53, Andrea wrote:
> Hi,
>
> I've tried to use polymorphism in QuantLib-SWING Java version
>
> Something like
>
> class MyPayoff extends Payoff {}

I did try as well

class MyPayoff extends PlainVanillaPayoff
{
        MyPayoff()
        {
                super(Option.Type.Put, 10.0);
        }

        public double getValue(double arg0)
        {
                throw new RuntimeException();
        }
}

but the exception is never thrown.

I've used this class in the example EquityOptions.java.


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev