Documentation of 'org.jfin.date.ScheduleCutter' Java class
ScheduleCutter
org.jfin.date

Class ScheduleCutter<T extends Period>



  • public class ScheduleCutter<T extends Period>
    extends java.lang.Object
    Class which provides functionality required to 'cut' one schedule by another schedule. This is used, for example, when you have a seperate schedule for the accrual periods from the notional, and the notional changes at a different frequency, or on different dates, from the accrual periods.
    • Constructor Summary

      Constructors 
      Constructor and Description
      ScheduleCutter() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.util.List<T> cutPeriodByDates(T period, java.util.List<java.util.Calendar> cutDates)
      Cuts the period based upon the cutDates and returns a List of the resultant periods or a List containing the original period if it wasn't cut.
      java.util.List<T> cutScheduleByDates(java.util.List<T> scheduleToCut, java.util.List<java.util.Calendar> cutDates) 
      java.util.List<T> cutSchedules(java.util.List<T> scheduleToCut, java.util.List<? extends Period> cutTemplate)
      Cuts the scheduleToCut using the dates contained within the cutTemplate
      boolean periodContainsDate(T period, java.util.Calendar date)
      Returns true if the date provided is *within* the period; the date given must be between the start and end date of the period excluding the start and end date.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ScheduleCutter

        public ScheduleCutter()
    • Method Detail

      • cutSchedules

        public java.util.List<T> cutSchedules(java.util.List<T> scheduleToCut,
                                              java.util.List<? extends Period> cutTemplate)
                                       throws ScheduleException
        Cuts the scheduleToCut using the dates contained within the cutTemplate
        Parameters:
        scheduleToCut - The schedule which contains the periods which are going to be cut
        cutTemplate - The schedule which contains the dates which are used to cut the scheduleToCut
        Returns:
        A list of periods from scheduleToCut, cut and cloned to match the cutTemplate
        Throws:
        ScheduleException - Throws a schedule exception if there are errors during the cut operation
      • cutScheduleByDates

        public java.util.List<T> cutScheduleByDates(java.util.List<T> scheduleToCut,
                                                    java.util.List<java.util.Calendar> cutDates)
                                             throws ScheduleException
        Throws:
        ScheduleException
      • cutPeriodByDates

        public java.util.List<T> cutPeriodByDates(T period,
                                                  java.util.List<java.util.Calendar> cutDates)
        Cuts the period based upon the cutDates and returns a List of the resultant periods or a List containing the original period if it wasn't cut.
        Parameters:
        period - The period to cut
        cutDates - The dates with which to perform the cut
        Returns:
        The resultant period or periods
      • periodContainsDate

        public boolean periodContainsDate(T period,
                                          java.util.Calendar date)
        Returns true if the date provided is *within* the period; the date given must be between the start and end date of the period excluding the start and end date.
        Parameters:
        period - The period to check
        date - The date to check
        Returns:
        true if the date is between the start and end date of the period excluding the start and end date, otherwise false

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.