Class Time

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class Time
    extends java.lang.Object
    implements java.lang.Cloneable, java.io.Serializable
    The alarm time struct.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Time()
      Create a new time.
      Time​(int seconds, int minutes, int hours, int weekday, int monthday, int month, int year)
      Create a new time.
      Time​(java.util.Date date)
      Create a new time.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object clone()
      Creates and returns a copy of this object.
      boolean equals​(java.lang.Object o)
      Test for equality.
      int getHours()
      Get the hours.
      int getMinutes()
      Get the minutes.
      int getMonth()
      Get the month.
      int getMonthday()
      Get the monthday.
      int getSeconds()
      Get the seconds.
      int getWeekday()
      Get the weekday.
      int getYear()
      Get the year.
      int hashCode()
      Compute the hashcode.
      void setHours​(int hours)
      Set the hours.
      void setMinutes​(int minutes)
      Set the minutes.
      void setMonth​(int month)
      Set the month.
      void setMonthday​(int monthday)
      Set the monthday.
      void setSeconds​(int seconds)
      Set the seconds.
      void setWeekday​(int weekday)
      Set the weekday.
      void setYear​(int year)
      Set the year.
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Time

        public Time()
        Create a new time.
      • Time

        public Time​(java.util.Date date)
        Create a new time.
      • Time

        public Time​(int seconds,
                    int minutes,
                    int hours,
                    int weekday,
                    int monthday,
                    int month,
                    int year)
        Create a new time.
        Parameters:
        seconds - The seconds.
        minutes - The minutes.
        hours - The hours.
        weekday - The weekday.
        monthday - The day in month.
        month - The month.
        year - The year.
    • Method Detail

      • getSeconds

        public int getSeconds()
        Get the seconds.
        Returns:
        The seconds.
      • setSeconds

        public void setSeconds​(int seconds)
        Set the seconds.
        Parameters:
        seconds - The seconds.
      • getMinutes

        public int getMinutes()
        Get the minutes.
        Returns:
        The minutes.
      • setMinutes

        public void setMinutes​(int minutes)
        Set the minutes.
        Parameters:
        minutes - The minutes.
      • getHours

        public int getHours()
        Get the hours.
        Returns:
        The hours.
      • setHours

        public void setHours​(int hours)
        Set the hours.
        Parameters:
        hours - The hours.
      • getWeekday

        public int getWeekday()
        Get the weekday.
        Returns:
        The weekday.
      • setWeekday

        public void setWeekday​(int weekday)
        Set the weekday.
        Parameters:
        weekday - The weekday.
      • getMonthday

        public int getMonthday()
        Get the monthday.
        Returns:
        The monthday.
      • setMonthday

        public void setMonthday​(int monthday)
        Set the monthday.
        Parameters:
        monthday - The monthday.
      • getMonth

        public int getMonth()
        Get the month.
        Returns:
        The month.
      • setMonth

        public void setMonth​(int month)
        Set the month.
        Parameters:
        month - The month.
      • getYear

        public int getYear()
        Get the year.
        Returns:
        The year.
      • setYear

        public void setYear​(int year)
        Set the year.
        Parameters:
        year - The year.
      • equals

        public boolean equals​(java.lang.Object o)
        Test for equality.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - The object to test.
        Returns:
        True if equal.
      • hashCode

        public int hashCode()
        Compute the hashcode.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        The hashcode.
      • clone

        public java.lang.Object clone()
        Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object
        Overrides:
        clone in class java.lang.Object