Class CronRange


  • public class CronRange
    extends java.lang.Object
    class representing one Job cron element

    here, an "item" refers to one of the 5 fields in a cron string; "element" refers to any comma-deliminated element in an "item"...which includes both numbers and '-' separated ranges.

    an Element can contain either an integer number or a range specified as CronRange. In case of integer numbers, begin and end are of the same value

    Version:
    $Revision$, $Date$
    Author:
    cfu
    • Constructor Summary

      Constructors 
      Constructor Description
      CronRange()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getBegin()
      gets the lower boundary value of the range
      int getEnd()
      gets the higher boundary value of the range
      boolean isValidRange​(int min, int max)
      checks to see if the lower and higher boundary values are within the min/max.
      void setBegin​(int i)
      sets the lower boundary value of the range
      void setEnd​(int i)
      sets the higher boundary value of the range
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CronRange

        public CronRange()
    • Method Detail

      • setBegin

        public void setBegin​(int i)
        sets the lower boundary value of the range
      • getBegin

        public int getBegin()
        gets the lower boundary value of the range
      • setEnd

        public void setEnd​(int i)
        sets the higher boundary value of the range
      • getEnd

        public int getEnd()
        gets the higher boundary value of the range
      • isValidRange

        public boolean isValidRange​(int min,
                                    int max)
        checks to see if the lower and higher boundary values are within the min/max.
        Parameters:
        min - the minimum value one can specify in this field
        max - the maximum value one can specify in this field
        Returns:
        a boolean (true/false) on whether the begin/end values are within the min/max passed in the params