Interface BasisPart


public interface BasisPart
Component of DayCountBasis. The day count basis consists of a month basis and a yearly basis. Each of these components implements this interface.
See Also:
  • Method Details

    • daysBetween

      int daysBetween(GregorianCalendar date1, GregorianCalendar date2)
      Returns the number of days from date1 to date2.
      Parameters:
      date1 - a GregorianCalendar which specifies the initial date
      date2 - a GregorianCalendar which specifies the final date
      Returns:
      an int indicating the number of days from date1 to date2.
    • getDaysInYear

      int getDaysInYear(GregorianCalendar date)
      Returns the number of days in the year.
      Parameters:
      date - a GregorianCalendar date.
      Returns:
      an int which specifies the number of days in the year
    • getDaysInYear

      int getDaysInYear(GregorianCalendar settlement, GregorianCalendar maturity)
      Deprecated.
      Returns the number of days in the year.
      Parameters:
      settlement - a GregorianCalendar date which specifies the settlement date
      maturity - a GregorianCalendar date which specifies the maturity date
      Returns:
      an int which specifies the number of days in the year
    • daysInPeriod

      double daysInPeriod(GregorianCalendar date, int frequency)
      Returns the number of days in a coupon period.
      Parameters:
      date - a GregorianCalendar which specifies the final date of the coupon period
      frequency - an int containing the number of coupon periods per year. This is typically 1, 2 or 4.
      Returns:
      an int which specifies the number of days in the coupon period