net.objectlab.kit.datecalc.common
Class WorkingWeek
java.lang.Object
net.objectlab.kit.datecalc.common.WorkingWeek
public class WorkingWeek
- extends Object
Immutable Working Week, default is Mon->Friday.
- Version:
- $Revision: 200 $ $Date: 2006-10-10 16:15:58 -0400 (Tue, 10 Oct 2006) $
- Author:
- Benoit Xhenseval, $LastChangedBy: benoitx $
|
Constructor Summary |
|
WorkingWeek()
Default Working Week Monday -> Friday. |
protected |
WorkingWeek(byte workingDays)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT
public static final WorkingWeek DEFAULT
WorkingWeek
public WorkingWeek()
- Default Working Week Monday -> Friday.
WorkingWeek
protected WorkingWeek(byte workingDays)
isWorkingDayFromCalendar
public boolean isWorkingDayFromCalendar(int dayOfWeek)
isWorkingDay
public boolean isWorkingDay(Date date)
isWorkingDay
public boolean isWorkingDay(Calendar cal)
adjustDay
protected int adjustDay(int dayOfWeek)
withWorkingDayFromCalendar
public WorkingWeek withWorkingDayFromCalendar(boolean working,
int dayOfWeek)
- If the value for the given day has changed, return a NEW WorkingWeek.
- Parameters:
working - true if working daydayOfWeek - e.g. Calendar.MONDAY, Calendar.TUESDAY, etc
- Returns:
- a new instance of a
WorkingWeek with the working
day set
getWorkingDays
public byte getWorkingDays()
Copyright © 2006-2010 Appendium - Portfolio Financing Platform. All Rights Reserved.