com.ftlabs.fisa
Class SettlementDateFactory

java.lang.Object
  extended by com.ftlabs.fisa.SettlementDateFactory
All Implemented Interfaces:
java.io.Serializable

public class SettlementDateFactory
extends java.lang.Object
implements java.io.Serializable

This class provides methods for getting a settlement date taking weekend days and holidays into consideration.

See Also:
Serialized Form

Constructor Summary
SettlementDateFactory(HolidaySchedule holidays)
          Creates a SettlementDateFactory that utilizes the provided HolidaySchedule to determine if a date is a holiday.
 
Method Summary
 java.util.Date getSettlementDate(java.util.Date startDate, int settlementDays)
          Gets a settlement date using the provided starting date.
 java.util.Date getSettlementDate(int settlementDays)
          Gets a settlement date using today as the start date.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SettlementDateFactory

public SettlementDateFactory(HolidaySchedule holidays)
Creates a SettlementDateFactory that utilizes the provided HolidaySchedule to determine if a date is a holiday.

Parameters:
holidays - The HolidaySchedule to use for this SettlementDateFactory.
Method Detail

getSettlementDate

public java.util.Date getSettlementDate(int settlementDays)
Gets a settlement date using today as the start date.

Parameters:
settlementDays - The number of business days from today.
Returns:
A settlement date.

getSettlementDate

public java.util.Date getSettlementDate(java.util.Date startDate,
                                        int settlementDays)
Gets a settlement date using the provided starting date.

Parameters:
startDate - The date for which the settlement date is calculated.
settlementDays - The number of business days from today.
Returns:
A settlement date.