|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.web.admin.users.parsers.DutySchedule
public class DutySchedule
This class holds information on the duty schedules that users can have. Converstion between different formats of the duty schedule information are possible, as is the comparision between a Calendar passed in and the start and stop times of each day in a duty schedule.
| Field Summary | |
|---|---|
static String[] |
DAY_NAMES
A list of names to abbreviate the days of the week |
static int |
FRIDAY
|
static int |
MONDAY
A series of constants to identify the days of the week as used by the DutySchedule class |
static int |
SATURDAY
|
static int |
SUNDAY
|
static int |
THURSDAY
|
static int |
TUESDAY
|
static int |
WEDNESDAY
|
| Constructor Summary | |
|---|---|
DutySchedule()
Create a new DutySchedule. |
|
DutySchedule(String aSchedule)
Create a new DutySchedule. |
|
DutySchedule(Vector aSchedule)
Create a new DutySchedule. |
|
| Method Summary | |
|---|---|
DutySchedule |
clone()
|
Vector<Object> |
getAsVector()
Deprecated. call the individual getters |
List<Boolean> |
getDaysAsBooleanList()
Gets the days this DutySchedule is active. |
int |
getStartTime()
Gets the start time. |
int |
getStopTime()
Gets the stop time. |
boolean |
hasDay(int aDay)
|
boolean |
isInSchedule(Calendar aTime)
Test if time is contined in schedule. |
void |
setDay(int aDay)
Sets the day. |
void |
setEndHour(int anHour)
Sets the stop Hour. |
void |
setStartHour(int anHour)
Sets the start Hour. |
String |
toString()
String representation. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MONDAY
public static final int TUESDAY
public static final int WEDNESDAY
public static final int THURSDAY
public static final int FRIDAY
public static final int SATURDAY
public static final int SUNDAY
public static final String[] DAY_NAMES
| Constructor Detail |
|---|
public DutySchedule()
public DutySchedule(Vector aSchedule)
aSchedule - Vector filled with 7 Boolean objects and two String objectspublic DutySchedule(String aSchedule)
aSchedule - the string to convert to a new DutySchedule| Method Detail |
|---|
public void setDay(int aDay)
aDay - the day index to set in the BitSetpublic int getStartTime()
public int getStopTime()
public List<Boolean> getDaysAsBooleanList()
public Vector<Object> getAsVector()
public boolean isInSchedule(Calendar aTime)
aTime - the time to check
public void setStartHour(int anHour)
anHour - the hour in military time to set the start time for the
DutySchedulepublic void setEndHour(int anHour)
anHour - the hour in military time to set the end time for the
DutySchedulepublic String toString()
toString in class Objectpublic boolean hasDay(int aDay)
public DutySchedule clone()
clone in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||