it.sauronsoftware.cron4j
Class SchedulingPatternValidator

java.lang.Object
  extended by it.sauronsoftware.cron4j.SchedulingPatternValidator

public class SchedulingPatternValidator
extends java.lang.Object

A scheduling patterns validator.

The class lets you validate a scheduling pattern before/without sending it to the schedule()/reschedule() method of a Scheduler instance. Simply call:

 boolean valid = SchedulingPatternValidator.validate(thePattern);
 

It is useful in validating user-entered patterns.

Author:
Carlo Pelliccia

Constructor Summary
SchedulingPatternValidator()
           
 
Method Summary
static boolean validate(java.lang.String schedulingPattern)
          This method validate a scheduling pattern string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchedulingPatternValidator

public SchedulingPatternValidator()
Method Detail

validate

public static boolean validate(java.lang.String schedulingPattern)
This method validate a scheduling pattern string.

Parameters:
schedulingPattern - The pattern.
Returns:
true if the pattern is valid. It means that it could be used in the scheduling of task, calling the schedule() method of a Scheduler object, without any trouble: if the pattern is valid no InvalidPatternException could be thrown.