CapFloor is a of with functions , keys and example object that represents a cap or floor or collar on some specified underlying index.
The referenced index can be either an ibor interest rate represented by or a year-on-year inflation index represented by
The cap is a series of caplets, where each caplet is effectively a call option on the underlying index with the strike K being the same for all caplets.
The floor is a series of floorlets, where each floorlet is effectively a put option on the underlying index with the strike K being the the same for all caplets.
The collar is simply the difference cap - floor, i.e. a portfolio consisting of a long cap and a short floor.
The exact payoff definition is described at
The pricing methodology is specified in