Class Schedule

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<java.lang.Object>

    public class Schedule
    extends java.lang.Object
    implements java.lang.Comparable<java.lang.Object>, java.io.Serializable
    Schedule abstraction and parse/format static method
    Since:
    JCMS 6.3
    Author:
    Ludovic SMADJA
    See Also:
    Serialized Form
    • Field Detail

    • 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​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • format

        public java.lang.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​(java.lang.Object obj)
        Specified by:
        compareTo in interface java.lang.Comparable<java.lang.Object>
      • parse

        public static Schedule parse​(java.lang.String str)
                              throws java.text.ParseException
        Throws:
        java.text.ParseException