Class CronSchedule.TimeRange

java.lang.Object
rs.baselib.util.CronSchedule.AbstractTimeValue
rs.baselib.util.CronSchedule.TimeRange
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
CronSchedule

public static class CronSchedule.TimeRange
extends CronSchedule.AbstractTimeValue
Represents a time range, e.g. 5-9
Author:
ralph
See Also:
Serialized Form
  • Constructor Summary

    Constructors 
    Constructor Description
    TimeRange​(int startValue, int endValue)  
    TimeRange​(java.lang.String range)  
  • Method Summary

    Modifier and Type Method Description
    int getEndValue()  
    int getStartValue()  
    boolean matches​(int timeValue)
    Returns true when given time value falls in range.
    void setEndValue​(int endValue)  
    void setStartValue​(int startValue)  
    java.lang.String toString()
    Returns cron-like string of this definition.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • TimeRange

      public TimeRange​(int startValue, int endValue)
    • TimeRange

      public TimeRange​(java.lang.String range)
  • Method Details

    • getEndValue

      public int getEndValue()
      Returns:
      the endValue
    • setEndValue

      public void setEndValue​(int endValue)
      Parameters:
      endValue - the endValue to set
    • getStartValue

      public int getStartValue()
      Returns:
      the startValue
    • setStartValue

      public void setStartValue​(int startValue)
      Parameters:
      startValue - the startValue to set
    • matches

      public boolean matches​(int timeValue)
      Returns true when given time value falls in range.
      Specified by:
      matches in class CronSchedule.AbstractTimeValue
      Parameters:
      timeValue - - time value to evaluate
      Returns:
      true when time falls in range
    • toString

      public java.lang.String toString()
      Returns cron-like string of this definition.
      Overrides:
      toString in class java.lang.Object