com.sun.management.oss.impl.pm.util
Class WeeklyScheduleImpl

java.lang.Object
  extended bycom.sun.management.oss.impl.pm.util.WeeklyScheduleImpl
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable, WeeklySchedule

public class WeeklyScheduleImpl
extends java.lang.Object
implements WeeklySchedule

Title: JSR090 Reference Implementation Description: Copyright: Copyright 2001 Ericsson Radio Systems AB Company: Ericsson

Version:
0.2
Author:
Andreas Jirven, Anna Eriksson, Ali Feizabadi
See Also:
Serialized Form

Constructor Summary
WeeklyScheduleImpl()
           
 
Method Summary
 java.lang.Object clone()
          Deep copy of this instance.
 java.util.TimeZone getTimeZone()
          Gets the time zone of the weekly schedule.
 boolean isActive()
          Checks if the schedule is active or not.
 boolean isFridayActive()
          Indicate if the day of week schedule is active on Friday.
 boolean isMondayActive()
          Indicate if the day of week schedule is active on Monday.
 boolean isSaturdayActive()
          Indicate if the day of week schedule is active on Saturday.
 boolean isSundayActive()
          Indicate if the day of week schedule is active on Sunday.
 boolean isThursdayActive()
          Indicate if the day of week schedule is active on Thursday.
 boolean isTuesdayActive()
          Indicate if the day of week schedule is active on Tuesday.
 boolean isWednesdayActive()
          Indicate if the day of week schedule is active on Wednesday.
 void setAllDaysActive()
          Sets all days of the week to be active in the day of weekly schedule.
 void setFridayActive(boolean fridayActive)
          Sets if Friday shall be active in the day of weekly schedule.
 void setMondayActive(boolean mondayActive)
          Sets if Monday shall be active in the day of weekly schedule.
 void setSaturdayActive(boolean saturdayActive)
          Sets if Saturday shall be active in the day of weekly schedule.
 void setSundayActive(boolean sundayActive)
          Sets if Sunday shall be active in the day of weekly schedule.
 void setThursdayActive(boolean thursdayActive)
          Sets if Thursday shall be active in the day of weekly schedule.
 void setTimeZone(java.util.TimeZone tz)
          Sets the time zone for the weekly schedule.
 void setTuesdayActive(boolean tuesdayActive)
          Sets if Tuesday shall be active in the day of weekly schedule.
 void setWednesdayActive(boolean wednesdayActive)
          Sets if Wednesday shall be active in the day of weekly schedule.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WeeklyScheduleImpl

public WeeklyScheduleImpl()
Method Detail

clone

public java.lang.Object clone()
Description copied from interface: WeeklySchedule
Deep copy of this instance.

Specified by:
clone in interface WeeklySchedule

isActive

public boolean isActive()
Checks if the schedule is active or not.

If the current day of week is within the defined schedule this method will return true. If the current day of week is outside the schedule false will be returned.

Specified by:
isActive in interface WeeklySchedule
Returns:
boolean Returns true if the schedule is active, else false.

getTimeZone

public java.util.TimeZone getTimeZone()
Gets the time zone of the weekly schedule.

Specified by:
getTimeZone in interface WeeklySchedule
Returns:
TimeZone The time zone of the weekly schedule.
See Also:
WeeklySchedule.setTimeZone(java.util.TimeZone)

setTimeZone

public void setTimeZone(java.util.TimeZone tz)
Sets the time zone for the weekly schedule.

If the time zone is not set the local time zone will be used.

Specified by:
setTimeZone in interface WeeklySchedule
Parameters:
tz - Time zone of the weekly schedule.
See Also:
WeeklySchedule.getTimeZone()

setAllDaysActive

public void setAllDaysActive()
Sets all days of the week to be active in the day of weekly schedule.

Specified by:
setAllDaysActive in interface WeeklySchedule

isMondayActive

public boolean isMondayActive()
Indicate if the day of week schedule is active on Monday.

Specified by:
isMondayActive in interface WeeklySchedule
Returns:
boolean Returns true if the day of week schedule is active on Monday, else it returns false.

setMondayActive

public void setMondayActive(boolean mondayActive)
Sets if Monday shall be active in the day of weekly schedule.

Specified by:
setMondayActive in interface WeeklySchedule
Parameters:
mondayActive - If true, Monday will be active in the day of weekly schedule. If false, Monday will not be active.

isTuesdayActive

public boolean isTuesdayActive()
Indicate if the day of week schedule is active on Tuesday.

Specified by:
isTuesdayActive in interface WeeklySchedule
Returns:
boolean Returns true if the day of week schedule is active on Tuesday, else it returns false.

setTuesdayActive

public void setTuesdayActive(boolean tuesdayActive)
Sets if Tuesday shall be active in the day of weekly schedule.

Specified by:
setTuesdayActive in interface WeeklySchedule
Parameters:
tuesdayActive - If true, Tuesday will be active in the day of weekly schedule. If false, Tuesday will not be active.

isWednesdayActive

public boolean isWednesdayActive()
Indicate if the day of week schedule is active on Wednesday.

Specified by:
isWednesdayActive in interface WeeklySchedule
Returns:
boolean Returns true if the day of week schedule is active on Wednesday, else it returns false.

setWednesdayActive

public void setWednesdayActive(boolean wednesdayActive)
Sets if Wednesday shall be active in the day of weekly schedule.

Specified by:
setWednesdayActive in interface WeeklySchedule
Parameters:
wednesdayActive - If true, Wednesday will be active in the day of weekly schedule. If false, Wednesday will not be active.

isThursdayActive

public boolean isThursdayActive()
Indicate if the day of week schedule is active on Thursday.

Specified by:
isThursdayActive in interface WeeklySchedule
Returns:
boolean Returns true if the day of week schedule is active on Thursday, else it returns false.

setThursdayActive

public void setThursdayActive(boolean thursdayActive)
Sets if Thursday shall be active in the day of weekly schedule.

Specified by:
setThursdayActive in interface WeeklySchedule
Parameters:
thursdayActive - If true, Thursday will be active in the day of weekly schedule. If false, Thursday will not be active.

isFridayActive

public boolean isFridayActive()
Indicate if the day of week schedule is active on Friday.

Specified by:
isFridayActive in interface WeeklySchedule
Returns:
boolean Returns true if the day of week schedule is active on Friday, else it returns false.

setFridayActive

public void setFridayActive(boolean fridayActive)
Sets if Friday shall be active in the day of weekly schedule.

Specified by:
setFridayActive in interface WeeklySchedule
Parameters:
fridayActive - If true, Friday will be active in the day of weekly schedule. If false, Friday will not be active.

isSaturdayActive

public boolean isSaturdayActive()
Indicate if the day of week schedule is active on Saturday.

Specified by:
isSaturdayActive in interface WeeklySchedule
Returns:
boolean Returns true if the day of week schedule is active on Saturday, else it returns false.

setSaturdayActive

public void setSaturdayActive(boolean saturdayActive)
Sets if Saturday shall be active in the day of weekly schedule.

Specified by:
setSaturdayActive in interface WeeklySchedule
Parameters:
saturdayActive - If true, Saturday will be active in the day of weekly schedule. If false, Saturday will not be active.

isSundayActive

public boolean isSundayActive()
Indicate if the day of week schedule is active on Sunday.

Specified by:
isSundayActive in interface WeeklySchedule
Returns:
boolean Returns true if the day of week schedule is active on Sunday, else it returns false.

setSundayActive

public void setSundayActive(boolean sundayActive)
Sets if Sunday shall be active in the day of weekly schedule.

Specified by:
setSundayActive in interface WeeklySchedule
Parameters:
sundayActive - If true, Sunday will be active in the day of weekly schedule. If false, Sunday will not be active.