net.objectlab.kit.datecalc.joda
Class YearMonthDayModifiedFollowingHandler

Package class diagram package YearMonthDayModifiedFollowingHandler
java.lang.Object
  extended by net.objectlab.kit.datecalc.joda.YearMonthDayModifiedFollowingHandler
All Implemented Interfaces:
HolidayHandler<YearMonthDay>
Direct Known Subclasses:
YearMonthDayModifiedPrecedingHandler, YearMonthDayModifiedPreceedingHandler

public class YearMonthDayModifiedFollowingHandler
extends Object
implements HolidayHandler<YearMonthDay>

A modified following handler will move the date forward if it falls on a non working day BUT, if the new date falls into another month, it will revert to moving backward until it finds a working day.

Version:
$Revision: 298 $ $Date: 2010-03-12 19:49:41 -0500 (Fri, 12 Mar 2010) $
Author:
Benoit Xhenseval, $LastChangedBy: benoitx $

Constructor Summary
YearMonthDayModifiedFollowingHandler()
           
 
Method Summary
 String getType()
          Give the type name for this algorithm.
protected  YearMonthDay move(DateCalculator<YearMonthDay> calculator, int step)
           
 YearMonthDay moveCurrentDate(DateCalculator<YearMonthDay> calculator)
          If the current date of the give calculator is a non-working day, it will be moved according to the algorithm implemented.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YearMonthDayModifiedFollowingHandler

public YearMonthDayModifiedFollowingHandler()
Method Detail

getType

public String getType()
Give the type name for this algorithm.

Specified by:
getType in interface HolidayHandler<YearMonthDay>
Returns:
algorithm name.

moveCurrentDate

public YearMonthDay moveCurrentDate(DateCalculator<YearMonthDay> calculator)
If the current date of the give calculator is a non-working day, it will be moved according to the algorithm implemented.

Specified by:
moveCurrentDate in interface HolidayHandler<YearMonthDay>
Parameters:
calculator - the calculator
Returns:
the date which may have moved.

move

protected YearMonthDay move(DateCalculator<YearMonthDay> calculator,
                            int step)


Copyright © 2006-2010 Appendium - Portfolio Financing Platform. All Rights Reserved.