net.objectlab.kit.datecalc.joda
Class LocalDateModifiedFollowingHandler

Package class diagram package LocalDateModifiedFollowingHandler
java.lang.Object
  extended by net.objectlab.kit.datecalc.joda.LocalDateModifiedFollowingHandler
All Implemented Interfaces:
HolidayHandler<LocalDate>
Direct Known Subclasses:
LocalDateModifiedPrecedingHandler

public class LocalDateModifiedFollowingHandler
extends Object
implements HolidayHandler<LocalDate>

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
LocalDateModifiedFollowingHandler()
           
 
Method Summary
 String getType()
          Give the type name for this algorithm.
protected  LocalDate move(DateCalculator<LocalDate> calculator, int step)
           
 LocalDate moveCurrentDate(DateCalculator<LocalDate> 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

LocalDateModifiedFollowingHandler

public LocalDateModifiedFollowingHandler()
Method Detail

moveCurrentDate

public LocalDate moveCurrentDate(DateCalculator<LocalDate> 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<LocalDate>
Parameters:
calculator - the calculator
Returns:
the date which may have moved.

move

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

getType

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

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


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