Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.able.rules
Class AbleTimePeriod

    java.lang.Object
      com.ibm.able.rules.AbleTimePeriod

All Implemented Interfaces:
  java.io.Serializable

public class AbleTimePeriod
extends java.lang.Object
implements java.io.Serializable

This class defines the Able time period built-in data type. It is used to specify a time period with optional masks for months of the year, days of the month, days of the week, and starting/ending time of day.

The masks follow the IETF Policy Framework TimePeriod Condition specification.

Any String arguments must follow the syntax supported by the java.lang.DateFormat class. An example String argument for the US locale is:

        "01/01/2004 11:00 PM"

An IllegalArgumentException will be thrown should the format not be as required.

See Also:
  Serialized Form

Field Summary
`static int` | `NO_MASK` Use this value to disable a mask.

Constructor Summary
`AbleTimePeriod(java.util.Calendar theStartValue, java.util.Calendar theEndValue)` Create a new time period instance over the specified range.
`AbleTimePeriod(java.util.Calendar theStartValue, java.util.Calendar theEndValue, java.util.Calendar theTimeOfDayStartMask, java.util.Calendar theTimeOfDayEndMask)` Create a new time period instance over the specified range.
`AbleTimePeriod(java.util.Calendar theStartValue, java.util.Calendar theEndValue, int theMonthMask)` Create a new time period instance over the specified range.
`AbleTimePeriod(java.util.Calendar theStartValue, java.util.Calendar theEndValue, int theDayOfWeekMask, java.util.Calendar theTimeOfDayStartMask, java.util.Calendar theTimeOfDayEndMask)` Create a new time period instance over the specified range.
`AbleTimePeriod(java.util.Calendar theStartValue, java.util.Calendar theEndValue, int theMonthMask, int theDayOfWeekMask)` Create a new time period instance over the specified range.
`AbleTimePeriod(java.util.Calendar theStartValue, java.util.Calendar theEndValue, int theMonthMask, int theDayOfWeekMask, java.lang.String theTimeOfDayMask)` Create a new time period instance over the specified range.
`AbleTimePeriod(java.util.Calendar theStartValue, java.util.Calendar theEndValue, int theMonthMask, long theDayOfMonthMask)` Create a new time period instance over the specified range.
`AbleTimePeriod(java.util.Calendar theStartValue, java.util.Calendar theEndValue, int theMonthMask, long theDayOfMonthMask, int theDayOfWeekMask, java.util.Calendar theTimeOfDayStartMask, java.util.Calendar theTimeOfDayEndMask)` Create a new time period instance over the specified range.
`AbleTimePeriod(java.util.Calendar theStartValue, java.util.Calendar theEndValue, java.lang.String theTimeOfDayMask)` Create a new time period instance over the specified range.
`AbleTimePeriod(java.util.Calendar theStartValue, java.lang.String theEndValue)` Create a new time period instance over the specified range.
`AbleTimePeriod(java.lang.String theStartValue, java.util.Calendar theEndValue)` Create a new time period instance over the specified range.
`AbleTimePeriod(java.lang.String theTimePeriod, int theMonthMask, long theDayOfMonthMask, int theDayOfWeekMask, java.lang.String theTimeOfDayMask)` Create a new local time period instance over the specified range using IETF formatted Strings and Masks.
`AbleTimePeriod(java.lang.String theTimePeriod, int theMonthMask, long theDayOfMonthMask, int theDayOfWeekMask, java.lang.String theTimeOfDayMask, boolean isLocalTime)` Create a new time period instance over the specified range using IETF formatted Strings and Masks.
`AbleTimePeriod(java.lang.String theStartValue, java.lang.String theEndValue)` Create a new time period instance over the specified range.
`AbleTimePeriod(java.lang.String theStartValue, java.lang.String theEndValue, int theMonthMask)` Create a new time period instance over the specified range.
`AbleTimePeriod(java.lang.String theStartValue, java.lang.String theEndValue, int theMonthMask, int theDayOfWeekMask)` Create a new time period instance over the specified range.
`AbleTimePeriod(java.lang.String theStartValue, java.lang.String theEndValue, int theMonthMask, int theDayOfWeekMask, java.lang.String theTimeOfDayMask)` Create a new time period instance over the specified range.
`AbleTimePeriod(java.lang.String theStartValue, java.lang.String theEndValue, int theMonthMask, long theDayOfMonthMask)` Create a new time period instance over the specified range.
`AbleTimePeriod(java.lang.String theStartValue, java.lang.String theEndValue, int theMonthMask, long theDayOfMonthMask, int theDayOfWeekMask, java.util.Calendar theTimeOfDayStartMask, java.util.Calendar theTimeOfDayEndMask)` Create a new time period instance over the specified range.
`AbleTimePeriod(java.lang.String theStartValue, java.lang.String theEndValue, int theMonthMask, long theDayOfMonthMask, int theDayOfWeekMask, java.lang.String theTimeOfDayMask)` Create a new time period instance over the specified range.
`AbleTimePeriod(java.lang.String theStartValue, java.lang.String theEndValue, int theDayOfWeekMask, java.lang.String theTimeOfDayMask)` Create a new time period instance over the specified range.
`AbleTimePeriod(java.lang.String theStartValue, java.lang.String theEndValue, java.lang.String theTimeOfDayMask)` Create a new time period instance over the specified range.

Method Summary
`boolean` | `contains(java.util.Calendar theCurrentTime)` Tests to see if the time provided falls between the start and end date/times in this time period.
`protected long` | `getDayOfMonthBitMask(int theDayOfMonth)` Return the bit mask for a given day of the month.
`protected long` | `getDayOfMonthBitMaskFromLast(java.util.Calendar theCurrentTime)` Return the bit mask for a given day from last month.
`protected int` | `getDayOfMonthFromLast(java.util.Calendar theCurrentTime)` Return the number of days between the provided time and the end of the month.
`long` | `getDayOfMonthMask()` Get the day of the month mask for this time period.
`protected int` | `getDayOfWeekBitMask(int theDayOfWeek)` Return the bit mask for a given day of the week.
`int` | `getDayOfWeekMask()` Get the day of week mask for this time period.
`protected int` | `getMonthBitMask(int theCalendarMonth)` Return the bit mask for a given calendar month.
`int` | `getMonthMask()` Get the month mask for this time period.
`java.util.Calendar` | `getTimeOfDayEndMask()` Get the end time mask for this time period
`java.util.Calendar` | `getTimeOfDayStartMask()` Get the start time mask for this time period.
`boolean` | `isInDayOfMonth(java.util.Calendar theCurrentTime)` Tests to see if the time provided falls between the start and end date/times in this time period.
`boolean` | `isInDayOfWeek(java.util.Calendar theCurrentTime)` Tests to see if the time provided falls between the start and end date/times in this time period.
`boolean` | `isInMonth(java.util.Calendar theCurrentTime)` Tests to see if the time provided falls between the start and end date/times in this time period.
`boolean` | `isInTimePeriod(java.util.Calendar theCurrentTime)` Tests to see if the time provided falls between the start and end date/times in this time period.
`boolean` | `isLocalTime()`
`java.util.BitSet` | `setDayOfMonthMask(int theDayOfMonthMask)` Set the day of the month mask for this time period.
`java.util.BitSet` | `setDayOfWeekMask(int theDayOfWeekMask)` Set the day of week mask for this time period.
`java.util.BitSet` | `setMonthMask(int theMonthMask)` Set the month mask for this time period.
`void` | `setTimeOfDayEndMask(java.util.Calendar theMaskValue)` Set the end time mask for this time period.
`void` | `setTimeOfDayMask(java.util.Calendar theStartValue, java.util.Calendar theEndValue)` Sets the time of day mask for this time period.
`void` | `setTimeOfDayMask(java.lang.String theTimeOfDayMask)` Sets the time of day mask for this time period using IETF syntax.
`void` | `setTimeOfDayStartMask(java.util.Calendar theMaskValue)` Set the start time mask for this time period.
`void` | `setTimePeriod(java.lang.String theTimePeriod)` Sets the time period using IETF syntax.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### NO_MASK

    public static final int NO_MASK

  Use this value to disable a mask.

  See Also:
    Constant Field Values

Constructor Detail

### AbleTimePeriod

    public AbleTimePeriod(java.lang.String theTimePeriod,
                          int theMonthMask,
                          long theDayOfMonthMask,
                          int theDayOfWeekMask,
                          java.lang.String theTimeOfDayMask)

  Create a new local time period instance over the specified range using IETF formatted Strings and Masks. Note that this implementation of THISANDPRIOR extends back to year 0, and of THISANDFUTURE forward to year 9999.

Parameters:
  `theTimePeriod` - The starting and ending date/time for this time period encoded as a single string value of the form:

                    "yyyymmddThhmmss/yyyymmddThhmmss"
                    "THISANDPRIOR/yyyymmddThhmmss"
                    "yyyymmddThhmmss/THISANDFUTURE"

  The ending date/time must come after the start date/time.
  `theMonthMask` - The subset of months to include in this time period

  `theDayOfMonthMask` - The days of the month to include in this time period (1-31)

  `theDayOfWeekMask` - The days of the week to include in this time period (1-7)

  `theTimeOfDayMask` - The starting and ending time of day for this time period encoded as a single string value of the form

  "Thhmmss/Thhmmss"

### AbleTimePeriod

    public AbleTimePeriod(java.lang.String theTimePeriod,
                          int theMonthMask,
                          long theDayOfMonthMask,
                          int theDayOfWeekMask,
                          java.lang.String theTimeOfDayMask,
                          boolean isLocalTime)

  Create a new time period instance over the specified range using IETF formatted Strings and Masks. Note that this implementation of THISANDPRIOR extends back to year 0, and of THISANDFUTURE forward to year 9999.

Parameters:
  `theTimePeriod` - The starting and ending date/time for this time period encoded as a single string value of the form:

                    "yyyymmddThhmmss/yyyymmddThhmmss"
                    "THISANDPRIOR/yyyymmddThhmmss"
                    "yyyymmddThhmmss/THISANDFUTURE"

  The ending date/time must come after the start date/time.
  `theMonthMask` - The subset of months to include in this time period

  `theDayOfMonthMask` - The days of the month to include in this time period (1-31)

  `theDayOfWeekMask` - The days of the week to include in this time period (1-7)

  `theTimeOfDayMask` - The starting and ending time of day for this time period encoded as a single string value of the form

  "Thhmmss/Thhmmss"

  `isLocalTime` - Use local time when true, universal when false.

### AbleTimePeriod

    public AbleTimePeriod(java.util.Calendar theStartValue,
                          java.util.Calendar theEndValue)

  Create a new time period instance over the specified range.

Parameters:
  `theStartValue` - The Calendar starting date/time for this time period. The start time must precede the ending time.

  `theEndValue` - The Calendar ending date/time for this time period. The ending time must be after the starting time.

### AbleTimePeriod

    public AbleTimePeriod(java.util.Calendar theStartValue,
                          java.lang.String theEndValue)

  Create a new time period instance over the specified range.

Parameters:
  `theStartValue` - The Calendar starting date/time for this time period The start time must precede the ending time.

  `theEndValue` - The String ending local date/time for this time period. The ending time must be after the starting time.

### AbleTimePeriod

    public AbleTimePeriod(java.lang.String theStartValue,
                          java.lang.String theEndValue)

  Create a new time period instance over the specified range.

Parameters:
  `theStartValue` - The String local starting date/time for this time period The start time must precede the ending time.

  `theEndValue` - The String local ending date/time for this time period. The ending time must be after the starting time.

### AbleTimePeriod

    public AbleTimePeriod(java.lang.String theStartValue,
                          java.util.Calendar theEndValue)

  Create a new time period instance over the specified range.

Parameters:
  `theStartValue` - The String local starting date/time for this time period The start time must precede the ending time.

  `theEndValue` - The Calendar ending date/time for this time period. The ending time must be after the starting time.

### AbleTimePeriod

    public AbleTimePeriod(java.util.Calendar theStartValue,
                          java.util.Calendar theEndValue,
                          int theMonthMask)

  Create a new time period instance over the specified range.

Parameters:
  `theStartValue` - The Calendar starting date/time for this time period The start time must precede the ending time.

  `theEndValue` - The Calendar ending date/time for this time period. The ending time must be after the starting time.

  `theMonthMask` - The int bitmask representing the subset of months to include in this time period

### AbleTimePeriod

    public AbleTimePeriod(java.lang.String theStartValue,
                          java.lang.String theEndValue,
                          int theMonthMask)

  Create a new time period instance over the specified range.

Parameters:
  `theStartValue` - The String local starting date/time for this time period The start time must precede the ending time.

  `theEndValue` - The String local ending date/time for this time period. The ending time must be after the starting time.

  `theMonthMask` - The int bitmask representing the subset of months to include in this time period

### AbleTimePeriod

    public AbleTimePeriod(java.util.Calendar theStartValue,
                          java.util.Calendar theEndValue,
                          int theMonthMask,
                          long theDayOfMonthMask)

  Create a new time period instance over the specified range.

Parameters:
  `theStartValue` - The Calendar starting date/time for this time period The start time must precede the ending time.

  `theEndValue` - The Calendar ending date/time for this time period. The ending time must be after the starting time.

  `theMonthMask` - The int bitmask representing the subset of months to include in this time period

  `theDayOfMonthMask` - The long bitmask representing the days of the month to include in this time period

### AbleTimePeriod

    public AbleTimePeriod(java.lang.String theStartValue,
                          java.lang.String theEndValue,
                          int theMonthMask,
                          long theDayOfMonthMask)

  Create a new time period instance over the specified range.

Parameters:
  `theStartValue` - The String local starting date/time for this time period The start time must precede the ending time.

  `theEndValue` - The String local ending date/time for this time period. The ending time must be after the starting time.

  `theMonthMask` - The int bitmask representing the subset of months to include in this time period

  `theDayOfMonthMask` - The long bitmask representing the days of the month to include in this time period

### AbleTimePeriod

    public AbleTimePeriod(java.util.Calendar theStartValue,
                          java.util.Calendar theEndValue,
                          int theMonthMask,
                          int theDayOfWeekMask)

  Create a new time period instance over the specified range.

Parameters:
  `theStartValue` - The Calendar starting date/time for this time period The start time must precede the ending time.

  `theEndValue` - The Calendar ending date/time for this time period. The ending time must be after the starting time.

  `theMonthMask` - The int bitmask representing the subset of months to include in this time period

  `theDayOfWeekMask` - The int bitmask representing the days of the week to include in this time period

### AbleTimePeriod

    public AbleTimePeriod(java.lang.String theStartValue,
                          java.lang.String theEndValue,
                          int theMonthMask,
                          int theDayOfWeekMask)

  Create a new time period instance over the specified range.

Parameters:
  `theStartValue` - The String starting local date/time for this time period The start time must precede the ending time.

  `theEndValue` - The String local ending date/time for this time period. The ending time must be after the starting time.

  `theMonthMask` - The subset of months to include in this time period

  `theDayOfWeekMask` - The days of the week to include in this time period (1-7)

### AbleTimePeriod

    public AbleTimePeriod(java.util.Calendar theStartValue,
                          java.util.Calendar theEndValue,
                          int theMonthMask,
                          int theDayOfWeekMask,
                          java.lang.String theTimeOfDayMask)

  Create a new time period instance over the specified range.

Parameters:
  `theStartValue` - The Calendar starting date/time for this time period The start time must precede the ending time.

  `theEndValue` - The Calendar ending date/time for this time period. The ending time must be after the starting time.

  `theMonthMask` - The int bitmask representing the subset of months to include in this time period

  `theDayOfWeekMask` - The int bitmask representing the days of the week to include in this time period

### AbleTimePeriod

    public AbleTimePeriod(java.lang.String theStartValue,
                          java.lang.String theEndValue,
                          int theMonthMask,
                          int theDayOfWeekMask,
                          java.lang.String theTimeOfDayMask)

  Create a new time period instance over the specified range.

Parameters:
  `theStartValue` - The String local starting date/time for this time period The start time must precede the ending time.

  `theEndValue` - The String local ending date/time for this time period. The ending time must be after the starting time.

  `theMonthMask` - The subset of months to include in this time period.

  `theDayOfWeekMask` - The days of the week to include in this time period (1-7).
  `theTimeOfDayMask` - The time of day to include in this time period.

### AbleTimePeriod

    public AbleTimePeriod(java.util.Calendar theStartValue,
                          java.util.Calendar theEndValue,
                          int theMonthMask,
                          long theDayOfMonthMask,
                          int theDayOfWeekMask,
                          java.util.Calendar theTimeOfDayStartMask,
                          java.util.Calendar theTimeOfDayEndMask)

  Create a new time period instance over the specified range.

Parameters:
  `theStartValue` - The Calendar starting date/time for this time period The start time must precede the ending time.

  `theEndValue` - The Calendar ending date/time for this time period. The ending time must be after the starting time.

  `theMonthMask` - The subset of months to include in this time period

  `theDayOfMonthMask` - The days of the month to include in this time period (1-31)

  `theDayOfWeekMask` - The days of the week to include in this time period (1-7)

  `theTimeOfDayStartMask` - The time of day to include in this period

  `theTimeOfDayEndMask` - The end of day to include in this period

### AbleTimePeriod

    public AbleTimePeriod(java.lang.String theStartValue,
                          java.lang.String theEndValue,
                          int theMonthMask,
                          long theDayOfMonthMask,
                          int theDayOfWeekMask,
                          java.util.Calendar theTimeOfDayStartMask,
                          java.util.Calendar theTimeOfDayEndMask)

  Create a new time period instance over the specified range.

Parameters:
  `theStartValue` - The String local starting date/time for this time period The start time must precede the ending time.

  `theEndValue` - The String local ending date/time for this time period. The ending time must be after the starting time.

  `theMonthMask` - The subset of months to include in this time period

  `theDayOfMonthMask` - The days of the month to include in this time period (1-31)

  `theDayOfWeekMask` - The days of the week to include in this time period (1-7)

  `theTimeOfDayStartMask` - The time of day to include in this period

  `theTimeOfDayEndMask` - The end of day to include in this period

### AbleTimePeriod

    public AbleTimePeriod(java.lang.String theStartValue,
                          java.lang.String theEndValue,
                          int theMonthMask,
                          long theDayOfMonthMask,
                          int theDayOfWeekMask,
                          java.lang.String theTimeOfDayMask)

  Create a new time period instance over the specified range.

Parameters:
  `theStartValue` - The String local starting date/time for this time period The start time must precede the ending time.

  `theEndValue` - The String local ending date/time for this time period. The ending time must be after the starting time.

  `theMonthMask` - The subset of months to include in this time period

  `theDayOfMonthMask` - The days of the month to include in this time period (1-31)

  `theDayOfWeekMask` - The days of the week to include in this time period (1-7)

  `theTimeOfDayMask` - The time of day to include in this period

### AbleTimePeriod

    public AbleTimePeriod(java.lang.String theStartValue,
                          java.lang.String theEndValue,
                          int theDayOfWeekMask,
                          java.lang.String theTimeOfDayMask)

  Create a new time period instance over the specified range.

Parameters:
  `theStartValue` - The String local starting date/time for this time period The start time must precede the ending time.

  `theEndValue` - The String local ending date/time for this time period. The ending time must be after the starting time.

  `theDayOfWeekMask` - The days of the week to include in this time period (1-7)

  `theTimeOfDayMask` - The time of day to include in this period

### AbleTimePeriod

    public AbleTimePeriod(java.util.Calendar theStartValue,
                          java.util.Calendar theEndValue,
                          int theDayOfWeekMask,
                          java.util.Calendar theTimeOfDayStartMask,
                          java.util.Calendar theTimeOfDayEndMask)

  Create a new time period instance over the specified range.

Parameters:
  `theStartValue` - The Calendar starting date/time for this time period The start time must precede the ending time.

  `theEndValue` - The Calendar ending date/time for this time period. The ending time must be after the starting time.

  `theDayOfWeekMask` - The days of the week to include in this time period (1-7)

  `theTimeOfDayStartMask` - The time of day to include in this period

  `theTimeOfDayEndMask` - The end of day to include in this period

### AbleTimePeriod

    public AbleTimePeriod(java.util.Calendar theStartValue,
                          java.util.Calendar theEndValue,
                          java.util.Calendar theTimeOfDayStartMask,
                          java.util.Calendar theTimeOfDayEndMask)

  Create a new time period instance over the specified range.

Parameters:
  `theStartValue` - The Calendar starting date/time for this time period The start time must precede the ending time.

  `theEndValue` - The Calendar ending date/time for this time period. The ending time must be after the starting time.

  `theTimeOfDayStartMask` - The time of day to include in this period

  `theTimeOfDayEndMask` - The end of day to include in this period

### AbleTimePeriod

    public AbleTimePeriod(java.util.Calendar theStartValue,
                          java.util.Calendar theEndValue,
                          java.lang.String theTimeOfDayMask)

  Create a new time period instance over the specified range.

Parameters:
  `theStartValue` - The Calendar starting date/time for this time period The start time must precede the ending time.

  `theEndValue` - The Calendar ending date/time for this time period. The ending time must be after the starting time.

  `theTimeOfDayMask` - The String representation of the time of day to include in this period Format is "Thhmmss/Thhmmss" as in the IETF Policy Framework spec

### AbleTimePeriod

    public AbleTimePeriod(java.lang.String theStartValue,
                          java.lang.String theEndValue,
                          java.lang.String theTimeOfDayMask)

  Create a new time period instance over the specified range.

Parameters:
  `theStartValue` - The String local starting date/time for this time period The start time must precede the ending time.

  `theEndValue` - The String local ending date/time for this time period. The ending time must be after the starting time.

  `theTimeOfDayMask` - The String representation of the time of day to include in this period Format is "Thhmmss/Thhmmss" as in the IETF Policy Framework spec

Method Detail

### setMonthMask

    public java.util.BitSet setMonthMask(int theMonthMask)

  Set the month mask for this time period. The constant ARL.ALL_DAYS_OF_MONTH be used to indicate any day, ARL.DAY_1 means the first day of the month, ARL.DAY_1 + ARL.DAY_2 the first or second day. To remove the mask, pass the value `NO_MASK`.

  Parameters:
    `theMonthMask` - The bitmapped int indicating which months are to be included in this time period. Note: LSB = Jan (0), MSB = Dec (11).

### getMonthMask

    public int getMonthMask()

  Get the month mask for this time period.

  Returns:
    The bitmapped int indicating which months are to be included in this time period. Note: LSB = Jan (0), MSB = Dec (11).

### isLocalTime

    public boolean isLocalTime()

  Returns:
    True if this time period uses local time, and False if universal.

### setDayOfMonthMask

    public java.util.BitSet setDayOfMonthMask(int theDayOfMonthMask)

  Set the day of the month mask for this time period. The constant ARL.ALL_MONTHS can be used to indicate all months, ARL.MAY for May, ARL.MAY + ARL.JUNE for May and June. To remove the mask, pass the value `NO_MASK`.

  Parameters:
    `theDayOfMonthMask` - The bitmapped int indicating which days in the month are to be included in this time period. Note: LSB (0) is day 1, MSB(30) is day 31.

### getDayOfMonthMask

    public long getDayOfMonthMask()

  Get the day of the month mask for this time period.

  Returns:
    The bitmapped int indicating which days in the month are to be included in this time period. Note: LSB (0) is day 1, MSB(30) is day 31.

### setDayOfWeekMask

    public java.util.BitSet setDayOfWeekMask(int theDayOfWeekMask)

  Set the day of week mask for this time period. The constant ARL.ALL_DAYS_OF_WEEK can be used to indicate all days, ARL.SUNDAY for Sunday, ARL.SATURDAY + ARL.SUNDAY mean weekends, which could be expressed also as the constant ARL.WEEKEND. To remove the mask, pass the value `NO_MASK`.

  Parameters:
    `theDayOfWeekMask` - The bitmapped int indicating the days of the week which are to be included in this time period. Note: LSB (0) = Monday.

### getDayOfWeekMask

    public int getDayOfWeekMask()

  Get the day of week mask for this time period.

  Returns:
    The bitmapped int indicating the days of the week which are to be included in this time period. Note: LSB (0) = Monday.

### setTimeOfDayStartMask

    public void setTimeOfDayStartMask(java.util.Calendar theMaskValue)

  Set the start time mask for this time period.

  Parameters:
    `theMaskValue` - The Calendar object indicating the start time for this time period.

### getTimeOfDayStartMask

    public java.util.Calendar getTimeOfDayStartMask()

  Get the start time mask for this time period.

  Returns:
    The Calendar object indicating the start time for this time period.

### setTimeOfDayEndMask

    public void setTimeOfDayEndMask(java.util.Calendar theMaskValue)

  Set the end time mask for this time period.

  Parameters:
    `theMaskValue` - The Calendar object indicating the end time for this time period

### getTimeOfDayEndMask

    public java.util.Calendar getTimeOfDayEndMask()

  Get the end time mask for this time period

  Returns:
    The Calendar object indicating the end time for this time period

### setTimeOfDayMask

    public void setTimeOfDayMask(java.util.Calendar theStartValue,
                                 java.util.Calendar theEndValue)

  Sets the time of day mask for this time period.

  Parameters:
    `theStartValue` - The start time to be included in this time period
    `theEndValue` - The end time to be included in this time period

### setTimeOfDayMask

    public void setTimeOfDayMask(java.lang.String theTimeOfDayMask)

  Sets the time of day mask for this time period using IETF syntax.

  Format = "Thhmmss/Thhmmss" or optionally "hh:mm:ss AM/hh:mm:ss PM"

  Parameters:
    `theTimeOfDayMask` - The start and end times to be included in this time period

### setTimePeriod

    public void setTimePeriod(java.lang.String theTimePeriod)

  Sets the time period using IETF syntax.

                    "yyyymmddThhmmss/yyyymmddThhmmss"
                    "THISANDPRIOR/yyyymmddThhmmss"
                    "yyyymmddThhmmss/THISANDFUTURE"

  Parameters:
    `theTimePeriod` - The start and end dates and times in a single string formatted per IETF specs

### isInTimePeriod

    public boolean isInTimePeriod(java.util.Calendar theCurrentTime)

  Tests to see if the time provided falls between the start and end date/times in this time period. Mask settings are not used in this determination.

  Parameters:
    `theCurrentTime` - The time to test.
  Returns:
    true If the time provided is contained in this time period.

### isInMonth

    public boolean isInMonth(java.util.Calendar theCurrentTime)

  Tests to see if the time provided falls between the start and end date/times in this time period. Mask settings are not used in this determination.

  Parameters:
    `theCurrentTime` - The time to test.
  Returns:
    true If the time provided is contained in this time period.

### isInDayOfWeek

    public boolean isInDayOfWeek(java.util.Calendar theCurrentTime)

  Tests to see if the time provided falls between the start and end date/times in this time period. Mask settings are not used in this determination.

  Parameters:
    `theCurrentTime` - The time to test.
  Returns:
    true If the time provided is contained in this time period.

### isInDayOfMonth

    public boolean isInDayOfMonth(java.util.Calendar theCurrentTime)

  Tests to see if the time provided falls between the start and end date/times in this time period. Mask settings are not used in this determination.

  Parameters:
    `theCurrentTime` - The time to test.
  Returns:
    true If the time provided is contained in this time period.

### contains

    public boolean contains(java.util.Calendar theCurrentTime)

  Tests to see if the time provided falls between the start and end date/times in this time period. Mask settings are used in this determination.

  Parameters:
    `theCurrentTime` - The time to test.
  Returns:
    true If the time provided is contained in this time period.

### getMonthBitMask

    protected int getMonthBitMask(int theCalendarMonth)

  Return the bit mask for a given calendar month.

  Parameters:
    `theCalendarMonth` - A calendar month such as java.util.Calendar.JANUARY.
  Returns:
    The bitmask equivalent such as com.ibm.able.rules.ARL.JANUARY. A month out of the range 0 - 11 returns a value of 0.

### getDayOfWeekBitMask

    protected int getDayOfWeekBitMask(int theDayOfWeek)

  Return the bit mask for a given day of the week.

  Parameters:
    `theDayOfWeek` - A week day such as java.util.Calendar.MONDAY.
  Returns:
    The bitmask equivalent such as com.ibm.able.rules.ARL.MONDAY. A day out of the range 0 - 6 returns a value of 0.

### getDayOfMonthBitMask

    protected long getDayOfMonthBitMask(int theDayOfMonth)

  Return the bit mask for a given day of the month.

  Parameters:
    `theDayOfMonth` - A month day ranging from 1 to 31.
  Returns:
    The bitmask equivalent such as com.ibm.able.rules.ARL.DAY_1. A day out of the range 1 - 31 returns a value of 0.

### getDayOfMonthBitMaskFromLast

    protected long getDayOfMonthBitMaskFromLast(java.util.Calendar theCurrentTime)

  Return the bit mask for a given day from last month.

  Parameters:
    `theCurrentTime` - The calendar indicating the current time.
  Returns:
    The bitmask equivalent such as com.ibm.able.rules.ARL.LAST_DAY_1.

### getDayOfMonthFromLast

    protected int getDayOfMonthFromLast(java.util.Calendar theCurrentTime)

  Return the number of days between the provided time and the end of the month.

  Parameters:
    `theCurrentTime` - The calendar indicating the current time.
  Returns:
    The integer number of days.

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

(C) Copyright IBM Corporation 1999, 2005