net.objectlab.kit.datecalc.common
Class WorkingWeek

Package class diagram package WorkingWeek
java.lang.Object
  extended by net.objectlab.kit.datecalc.common.WorkingWeek
Direct Known Subclasses:
JodaWorkingWeek

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 $

Field Summary
static WorkingWeek DEFAULT
           
 
Constructor Summary
  WorkingWeek()
          Default Working Week Monday -> Friday.
protected WorkingWeek(byte workingDays)
           
 
Method Summary
protected  int adjustDay(int dayOfWeek)
           
 byte getWorkingDays()
           
 boolean isWorkingDay(Calendar cal)
           
 boolean isWorkingDay(Date date)
           
 boolean isWorkingDayFromCalendar(int dayOfWeek)
           
 WorkingWeek withWorkingDayFromCalendar(boolean working, int dayOfWeek)
          If the value for the given day has changed, return a NEW WorkingWeek.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static final WorkingWeek DEFAULT
Constructor Detail

WorkingWeek

public WorkingWeek()
Default Working Week Monday -> Friday.


WorkingWeek

protected WorkingWeek(byte workingDays)
Method Detail

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 day
dayOfWeek - 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.