Documentation of 'org.jfin.date.accrual.AccrualSchedule' Java class
AccrualSchedule
org.jfin.date.accrual

Class AccrualSchedule<T extends AccrualPeriod,U extends Payment>



  • public class AccrualSchedule<T extends AccrualPeriod,U extends Payment>
    extends java.lang.Object
    Used to manage and manipulate an AccrualSchedule and a NotionalSchedule
    • Constructor Summary

      Constructors 
      Constructor and Description
      AccrualSchedule(U paymentPrototype)
      Base constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void add(int i, T t)
      Inserts an accrual period at an index
      boolean add(T accrualPeriod)
      Adds the accrual period to the schedule
      boolean addAll(java.util.Collection<? extends T> ts)
      Adds all of the provided accrual periods to the schedule
      boolean addAll(int i, java.util.Collection<? extends T> ts)
      Adds all of the provided accrual periods to the schedule at a specific point
      void clear()
      Clears all accrual periods from the schedule
      boolean contains(java.lang.Object o)
      Returns true if this schedule contains the period o
      boolean containsAll(java.util.Collection<?> objects)
      Determines whether or not this schedule contains all of the accrual periods in a collection.
      T get(int i)
      Gets the accrual period at an index
      java.util.List<T> getAccrualPeriods()
      Gets the accrual periods
      java.util.Calendar getEndCalendar()
      Get the end date as a calendar for the periods
      java.util.List<U> getNettedPayments(NotionalSchedule notionalSchedule)
      Returns a netted list of payments for a given notional schedule
      java.util.List<U> getPayments(NotionalSchedule notionalSchedule)
      Gets a list of payments for a given notional schedule
      java.util.Calendar getStartCalendar()
      Get the start date as a calendar for the periods
      int indexOf(java.lang.Object o)
      Get the index of a particular accrual period
      boolean isEmpty()
      Returns true if this schedule contains no accrual periods, otherwise false
      java.util.Iterator<T> iterator()
      Returns an iterator of the accrual periods contained in this schedule
      int lastIndexOf(java.lang.Object o)
      Get the last index of a particular accrual period
      java.util.List<U> netPayments(java.util.List<U> payments)
      Nets a list of payments together
      T remove(int i)
      Remove an accrual period at an index
      boolean remove(java.lang.Object o)
      Removes the accrual period provided from the schedule
      boolean removeAll(java.util.Collection<?> objects)
      Removes a collection of accrual periods from the schedule
      boolean retainAll(java.util.Collection<?> objects)
      Removes all but a collection of accrual periods from the schedule
      T set(int i, T t)
      Sets the accrual period at an index
      void setAccrualPeriods(java.util.List<T> accrualPeriods)
      Sets the accrual periods
      int size()
      Gets the size of the schedule (i.e.
      java.util.List<T> subList(int i, int i1)
      Takes a sub list of the accrual periods in a schedule between two indices
      • Methods inherited from class java.lang.Object

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

      • AccrualSchedule

        public AccrualSchedule(U paymentPrototype)
        Base constructor
        Parameters:
        paymentPrototype - A prototype of the payment
    • Method Detail

      • getNettedPayments

        public java.util.List<U> getNettedPayments(NotionalSchedule notionalSchedule)
                                            throws java.lang.Exception
        Returns a netted list of payments for a given notional schedule
        Parameters:
        notionalSchedule - The notional schedule
        Returns:
        A netted list of payments
        Throws:
        java.lang.Exception - If there is a problem calculating the netted payments
      • netPayments

        public java.util.List<U> netPayments(java.util.List<U> payments)
        Nets a list of payments together
        Parameters:
        payments - The payments to net together
        Returns:
        The payments netted together
      • getPayments

        public java.util.List<U> getPayments(NotionalSchedule notionalSchedule)
                                      throws java.lang.Exception
        Gets a list of payments for a given notional schedule
        Parameters:
        notionalSchedule - The notional schedule
        Returns:
        A list of payments
        Throws:
        java.lang.Exception - If there is a problem calculating the payments
      • getStartCalendar

        public java.util.Calendar getStartCalendar()
                                            throws AccrualException
        Get the start date as a calendar for the periods
        Returns:
        The start calendar
        Throws:
        AccrualException - If there is a problem calculating the start calendar
      • getEndCalendar

        public java.util.Calendar getEndCalendar()
                                          throws AccrualException
        Get the end date as a calendar for the periods
        Returns:
        The end calendar
        Throws:
        AccrualException - If there is a problem calculating the start calendar
      • getAccrualPeriods

        public java.util.List<T> getAccrualPeriods()
        Gets the accrual periods
        Returns:
        The accrual periods
      • setAccrualPeriods

        public void setAccrualPeriods(java.util.List<T> accrualPeriods)
        Sets the accrual periods
        Parameters:
        accrualPeriods - The accrual periods
      • size

        public int size()
        Gets the size of the schedule (i.e. the number of accrual periods it contains)
        Returns:
        The number of accrual periods
      • isEmpty

        public boolean isEmpty()
        Returns true if this schedule contains no accrual periods, otherwise false
        Returns:
        Whether the schedule is empty
      • contains

        public boolean contains(java.lang.Object o)
        Returns true if this schedule contains the period o
        Parameters:
        o - The period to check for
        Returns:
        True if the period is in this schedule, otherwise false
      • iterator

        public java.util.Iterator<T> iterator()
        Returns an iterator of the accrual periods contained in this schedule
        Returns:
        An iterator of the accrual periods
      • add

        public boolean add(T accrualPeriod)
        Adds the accrual period to the schedule
        Parameters:
        accrualPeriod -
        Returns:
        True
      • remove

        public boolean remove(java.lang.Object o)
        Removes the accrual period provided from the schedule
        Parameters:
        o - The accrual period to remove
        Returns:
        True if the object was removed, otherwise false
      • containsAll

        public boolean containsAll(java.util.Collection<?> objects)
        Determines whether or not this schedule contains all of the accrual periods in a collection.
        Parameters:
        objects - The collection of accrual periods to check for
        Returns:
        True if this schedule contains all of the accrual periods, otherwise false
      • addAll

        public boolean addAll(java.util.Collection<? extends T> ts)
        Adds all of the provided accrual periods to the schedule
        Parameters:
        ts - The accrual periods to add
        Returns:
        True
      • addAll

        public boolean addAll(int i,
                              java.util.Collection<? extends T> ts)
        Adds all of the provided accrual periods to the schedule at a specific point
        Parameters:
        i - Where to insert the accrual periods
        ts - The accrual periods to add
        Returns:
        True
      • removeAll

        public boolean removeAll(java.util.Collection<?> objects)
        Removes a collection of accrual periods from the schedule
        Parameters:
        objects - The accrual periods to remove
        Returns:
        True
      • retainAll

        public boolean retainAll(java.util.Collection<?> objects)
        Removes all but a collection of accrual periods from the schedule
        Parameters:
        objects - The accrual periods to retain
        Returns:
        true
      • clear

        public void clear()
        Clears all accrual periods from the schedule
      • get

        public T get(int i)
        Gets the accrual period at an index
        Parameters:
        i - The index
        Returns:
        The accrual period at index i
      • set

        public T set(int i,
                     T t)
        Sets the accrual period at an index
        Parameters:
        i - The index
        t - The accrual period
        Returns:
        The accrual period set
      • add

        public void add(int i,
                        T t)
        Inserts an accrual period at an index
        Parameters:
        i - The index
        t - The accrual period
      • remove

        public T remove(int i)
        Remove an accrual period at an index
        Parameters:
        i - The index
        Returns:
        The accrual period removed
      • indexOf

        public int indexOf(java.lang.Object o)
        Get the index of a particular accrual period
        Parameters:
        o - The accrual period
        Returns:
        The index of the accrual period in the schedule, or -1 if the schedule does not contain the given period
      • lastIndexOf

        public int lastIndexOf(java.lang.Object o)
        Get the last index of a particular accrual period
        Parameters:
        o - The accrual period
        Returns:
        The last index of the accrual period in the schedule, or -1 if the schedule does not contain the given period
      • subList

        public java.util.List<T> subList(int i,
                                         int i1)
        Takes a sub list of the accrual periods in a schedule between two indices
        Parameters:
        i - The start index
        i1 - The end index
        Returns:
        The sub list of accrual periods

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.