Class CappedFlooredCoupon
- java.lang.Object
-
- org.jquantlib.cashflow.Event
-
- org.jquantlib.cashflow.CashFlow
-
- org.jquantlib.cashflow.Coupon
-
- org.jquantlib.cashflow.FloatingRateCoupon
-
- org.jquantlib.cashflow.CappedFlooredCoupon
-
- All Implemented Interfaces:
- java.lang.Comparable<CashFlow>, Observable, Observer, PolymorphicVisitable
- Direct Known Subclasses:
- CappedFlooredCmsCoupon, CappedFlooredIborCoupon
public class CappedFlooredCoupon extends FloatingRateCoupon
Coupon paying a variable index-based rate
-
-
Constructor Summary
Constructors Constructor and Description CappedFlooredCoupon(FloatingRateCoupon underlying)CappedFlooredCoupon(FloatingRateCoupon underlying, double cap, double floor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaccept(PolymorphicVisitor pv)This method is intended to extend the semantics of methodVisitable.accept(Visitor)doublecap()doubleconvexityAdjustment()doublefloor()booleanisCapped()booleanisFloored()doublerate()voidsetPricer(FloatingRateCouponPricer pricer)voidupdate()This method is called whenever the observed object is changed.-
Methods inherited from class org.jquantlib.cashflow.FloatingRateCoupon
accruedAmount, adjustedFixing, amount, convexityAdjustmentImpl, dayCounter, fixingDate, fixingDays, gearing, index, indexFixing, isInArrears, price, pricer, spread
-
Methods inherited from class org.jquantlib.cashflow.Coupon
accrualDays, accrualEndDate, accrualPeriod, accrualStartDate, date, nominal, referencePeriodEnd, referencePeriodStart
-
Methods inherited from class org.jquantlib.cashflow.Event
addObserver, countObservers, deleteObserver, deleteObservers, getObservers, hasOccurred, hasOccurred, notifyObservers, notifyObservers
-
-
-
-
Constructor Detail
-
CappedFlooredCoupon
public CappedFlooredCoupon(FloatingRateCoupon underlying)
-
CappedFlooredCoupon
public CappedFlooredCoupon(FloatingRateCoupon underlying, double cap, double floor)
-
-
Method Detail
-
setPricer
public void setPricer(FloatingRateCouponPricer pricer)
- Overrides:
setPricerin classFloatingRateCoupon
-
rate
public double rate()
- Overrides:
ratein classFloatingRateCoupon
-
convexityAdjustment
public double convexityAdjustment()
- Overrides:
convexityAdjustmentin classFloatingRateCoupon
-
isCapped
public boolean isCapped()
-
isFloored
public boolean isFloored()
-
cap
public double cap()
-
floor
public double floor()
-
update
public void update()
Description copied from interface:ObserverThis method is called whenever the observed object is changed.- Specified by:
updatein interfaceObserver- Overrides:
updatein classFloatingRateCoupon
-
accept
public void accept(PolymorphicVisitor pv)
Description copied from interface:PolymorphicVisitableThis method is intended to extend the semantics of methodVisitable.accept(Visitor)In a conventional Visitor design pattern, the
acceptmethod is called when access to visit a data structure is requested. AVisitorobject is passed as argument in case permission is granted to thatVisitorto access the data structure. Obviously,Visitors andVisitables work in pairs and the class which provides the data structure to be visited also implementsVisitablein order to properly grant access when the expectedVisitoris received.In the case of a
PolymorphicVisitable, aPolymorphicVisitoris passed instead of aVisitor. APolymorphicVisitoris in fact, a composition ofVisitors and not only a singleVisitor. APolymorphicVisitoris responsible for returning the correctVisitorresponsible for processing a certain data structure.The initial design of pairs made of <
Visitor,Visitable> is extended to a concept of a matrix made of multipleVisitors against multipleVisitables. Every class which implementsPolymorphicVisitablepasses different data structures when queryingPolymorphicVisitors.- Specified by:
acceptin interfacePolymorphicVisitable- Overrides:
acceptin classFloatingRateCoupon- See Also:
PolymorphicVisitor#getVisitor(Class)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG