com.ftlabs.fisa.calc
Class DiscountQuote

java.lang.Object
  extended by com.ftlabs.fisa.calc.DiscountQuote
All Implemented Interfaces:
Quote, java.io.Serializable

public class DiscountQuote
extends java.lang.Object
implements Quote

A discount based implementation of Quote.

See Also:
Serialized Form

Constructor Summary
DiscountQuote(double discount)
          Constructs a new DiscountQuote using the provided discount.
 
Method Summary
 double getDiscount()
          Get the discount.
 double getPrice(Calculator maturityCalculator, Calculator[] otherRedemptionCalculators)
          Returns a price.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiscountQuote

public DiscountQuote(double discount)
Constructs a new DiscountQuote using the provided discount.

Parameters:
discount - the discount.
Method Detail

getDiscount

public double getDiscount()
Get the discount.

Returns:
the discount.

getPrice

public double getPrice(Calculator maturityCalculator,
                       Calculator[] otherRedemptionCalculators)
                throws CalculationException
Description copied from interface: Quote
Returns a price. This method would not normally be called directly by a user.

Specified by:
getPrice in interface Quote
Parameters:
maturityCalculator - A calculator bound to maturity.
otherRedemptionCalculators - An array of calculators bound to each of the calls.
Returns:
the price
Throws:
CalculationException