Class Astronomy

  • All Implemented Interfaces:
    Serializable, Cloneable

    public class Astronomy
    extends Object
    implements Serializable, Cloneable
    Forecast information about current astronomical conditions. Attributes:
    • sunrise: today's sunrise time. The time is a string in a local time format of "h:mm am/pm", for example "7:02 am" (string)
    • sunset today's sunset time. The time is a string in a local time format of "h:mm am/pm", for example "4:51 pm" (string)
    See Also:
    Serialized Form
    • Constructor Detail

      • Astronomy

        public Astronomy()
        Simple constructor.
      • Astronomy

        public Astronomy​(Date sunrise,
                         Date sunset)
        Parameters:
        sunrise - time of sunrise (from 0ms)
        sunset - time of sunset (from 0ms)
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getSunrise

        public Date getSunrise()
        Time of sunrise
        Returns:
        ime of sunrise (from 0ms)
      • setSunrise

        public void setSunrise​(Date sunrise)
        Time of sunrise
        Parameters:
        sunrise - ime of sunrise (from 0ms)
      • getSunset

        public Date getSunset()
        Time of sunset
        Returns:
        time of sunset (from 0ms)
      • setSunset

        public void setSunset​(Date sunset)
        Time of sunset
        Parameters:
        sunset - time of sunset (from 0ms)