com.jalios.jdring
Class Schedule

java.lang.Object
  extended by com.jalios.jdring.Schedule
All Implemented Interfaces:
Serializable, Comparable<Object>

public class Schedule
extends Object
implements Comparable<Object>, Serializable

Schedule abstraction and parse/format static method

Since:
JCMS 6.3
Author:
Ludovic SMADJA
See Also:
Serialized Form

Field Summary
static String REVISION
          SVN REVISION
 
Constructor Summary
Schedule()
           
Schedule(int minute, int hour, int dayOfMonth, int month, int dayOfWeek, int year)
          Default Constructor
 
Method Summary
 int compareTo(Object obj)
           
 boolean equals(Object obj)
           
 String format()
          Returns the formated string (minute hour dayOfMonth month dayOfWeek year)
 int getDayOfMonth()
           
 int getDayOfWeek()
           
 int getHour()
           
 int getMinute()
           
 int getMonth()
           
 int getYear()
           
static Schedule parse(String str)
           
 void setDayOfMonth(int dayOfMonth)
           
 void setDayOfWeek(int dayOfWeek)
           
 void setHour(int hour)
           
 void setMinute(int minute)
           
 void setMonth(int month)
           
 void setYear(int year)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
SVN REVISION

See Also:
Constant Field Values
Constructor Detail

Schedule

public Schedule()

Schedule

public Schedule(int minute,
                int hour,
                int dayOfMonth,
                int month,
                int dayOfWeek,
                int year)
Default Constructor

Parameters:
minute - -1 indicates every minutes
hour - -1 indicates every hours
dayOfMonth - -1 indicates every day of month
month - -1 indicates every month
dayOfWeek - -1 indicates every day of week
year - -1 indicates every year
Method Detail

getMinute

public int getMinute()
Returns:
the minute

setMinute

public void setMinute(int minute)
Parameters:
minute - the minute to set

getHour

public int getHour()
Returns:
the hour

setHour

public void setHour(int hour)
Parameters:
hour - the hour to set

getDayOfMonth

public int getDayOfMonth()
Returns:
the dayOfMonth

setDayOfMonth

public void setDayOfMonth(int dayOfMonth)
Parameters:
dayOfMonth - the dayOfMonth to set

getMonth

public int getMonth()
Returns:
the month

setMonth

public void setMonth(int month)
Parameters:
month - the month to set

getDayOfWeek

public int getDayOfWeek()
Returns:
the dayOfWeek

setDayOfWeek

public void setDayOfWeek(int dayOfWeek)
Parameters:
dayOfWeek - the dayOfWeek to set

getYear

public int getYear()
Returns:
the year

setYear

public void setYear(int year)
Parameters:
year - the year to set

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

format

public String format()
Returns the formated string (minute hour dayOfMonth month dayOfWeek year)

Returns:
the formated string (minute hour dayOfMonth month dayOfWeek year)

compareTo

public int compareTo(Object obj)
Specified by:
compareTo in interface Comparable<Object>

parse

public static Schedule parse(String str)
                      throws ParseException
Throws:
ParseException


Copyright © 2001-2010 Jalios SA. All Rights Reserved.