Documentation of 'com.luckycatlabs.sunrisesunset.SunriseSunsetCalculator' Java class
SunriseSunsetCalculator
com.luckycatlabs.sunrisesunset

Class SunriseSunsetCalculator



  • public class SunriseSunsetCalculator
    extends java.lang.Object
    Public interface for getting the various types of sunrise/sunset.
    • Constructor Summary

      Constructors 
      Constructor and Description
      SunriseSunsetCalculator(Location location, java.lang.String timeZoneIdentifier)
      Constructs a new SunriseSunsetCalculator with the given Location
      SunriseSunsetCalculator(Location location, java.util.TimeZone timeZone)
      Constructs a new SunriseSunsetCalculator with the given Location
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.util.Calendar getAstronomicalSunriseCalendarForDate(java.util.Calendar date)
      Returns the astronomical (108deg) sunrise for the given date.
      java.lang.String getAstronomicalSunriseForDate(java.util.Calendar date)
      Returns the astronomical (108deg) sunrise for the given date.
      java.util.Calendar getAstronomicalSunsetCalendarForDate(java.util.Calendar date)
      Returns the astronomical (108deg) sunset for the given date.
      java.lang.String getAstronomicalSunsetForDate(java.util.Calendar date)
      Returns the astronomical (108deg) sunset for the given date.
      java.util.Calendar getCivilSunriseCalendarForDate(java.util.Calendar date)
      Returns the civil sunrise (twilight, 96deg) for the given date.
      java.lang.String getCivilSunriseForDate(java.util.Calendar date)
      Returns the civil sunrise (twilight, 96deg) for the given date.
      java.util.Calendar getCivilSunsetCalendarForDate(java.util.Calendar date)
      Returns the civil sunset (twilight, 96deg) for the given date.
      java.lang.String getCivilSunsetForDate(java.util.Calendar date)
      Returns the civil sunset (twilight, 96deg) for the given date.
      Location getLocation()
      Returns the location where the sunrise/sunset is calculated for.
      java.util.Calendar getNauticalSunriseCalendarForDate(java.util.Calendar date)
      Returns the nautical (102deg) sunrise for the given date.
      java.lang.String getNauticalSunriseForDate(java.util.Calendar date)
      Returns the nautical (102deg) sunrise for the given date.
      java.util.Calendar getNauticalSunsetCalendarForDate(java.util.Calendar date)
      Returns the nautical (102deg) sunset for the given date.
      java.lang.String getNauticalSunsetForDate(java.util.Calendar date)
      Returns the nautical (102deg) sunset for the given date.
      java.util.Calendar getOfficialSunriseCalendarForDate(java.util.Calendar date)
      Returns the official sunrise (90deg 50', 90.8333deg) for the given date.
      java.lang.String getOfficialSunriseForDate(java.util.Calendar date)
      Returns the official sunrise (90deg 50', 90.8333deg) for the given date.
      java.util.Calendar getOfficialSunsetCalendarForDate(java.util.Calendar date)
      Returns the official sunrise (90deg 50', 90.8333deg) for the given date.
      java.lang.String getOfficialSunsetForDate(java.util.Calendar date)
      Returns the official sunrise (90deg 50', 90.8333deg) for the given date.
      static java.util.Calendar getSunrise(double latitude, double longitude, java.util.TimeZone timeZone, java.util.Calendar date, double degrees)
      Computes the sunrise for an arbitrary declination.
      static java.util.Calendar getSunset(double latitude, double longitude, java.util.TimeZone timeZone, java.util.Calendar date, double degrees)
      Computes the sunset for an arbitrary declination.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SunriseSunsetCalculator

        public SunriseSunsetCalculator(Location location,
                                       java.lang.String timeZoneIdentifier)
        Constructs a new SunriseSunsetCalculator with the given Location
        Parameters:
        location - Location object containing the Latitude/Longitude of the location to compute the sunrise/sunset for.
        timeZoneIdentifier - String identifier for the timezone to compute the sunrise/sunset times in. In the form "America/New_York". Please see the zi directory under the JDK installation for supported time zones.
      • SunriseSunsetCalculator

        public SunriseSunsetCalculator(Location location,
                                       java.util.TimeZone timeZone)
        Constructs a new SunriseSunsetCalculator with the given Location
        Parameters:
        location - Location object containing the Latitude/Longitude of the location to compute the sunrise/sunset for.
        timeZone - timezone to compute the sunrise/sunset times in.
    • Method Detail

      • getAstronomicalSunriseForDate

        public java.lang.String getAstronomicalSunriseForDate(java.util.Calendar date)
        Returns the astronomical (108deg) sunrise for the given date.
        Parameters:
        date - Calendar object containing the date to compute the astronomical sunrise for.
        Returns:
        the astronomical sunrise time in HH:MM (24-hour clock) form.
      • getAstronomicalSunriseCalendarForDate

        public java.util.Calendar getAstronomicalSunriseCalendarForDate(java.util.Calendar date)
        Returns the astronomical (108deg) sunrise for the given date.
        Parameters:
        date - Calendar object containing the date to compute the astronomical sunrise for.
        Returns:
        the astronomical sunrise time as a Calendar
      • getAstronomicalSunsetForDate

        public java.lang.String getAstronomicalSunsetForDate(java.util.Calendar date)
        Returns the astronomical (108deg) sunset for the given date.
        Parameters:
        date - Calendar object containing the date to compute the astronomical sunset for.
        Returns:
        the astronomical sunset time in HH:MM (24-hour clock) form.
      • getAstronomicalSunsetCalendarForDate

        public java.util.Calendar getAstronomicalSunsetCalendarForDate(java.util.Calendar date)
        Returns the astronomical (108deg) sunset for the given date.
        Parameters:
        date - Calendar object containing the date to compute the astronomical sunset for.
        Returns:
        the astronomical sunset time as a Calendar
      • getNauticalSunriseForDate

        public java.lang.String getNauticalSunriseForDate(java.util.Calendar date)
        Returns the nautical (102deg) sunrise for the given date.
        Parameters:
        date - Calendar object containing the date to compute the nautical sunrise for.
        Returns:
        the nautical sunrise time in HH:MM (24-hour clock) form.
      • getNauticalSunriseCalendarForDate

        public java.util.Calendar getNauticalSunriseCalendarForDate(java.util.Calendar date)
        Returns the nautical (102deg) sunrise for the given date.
        Parameters:
        date - Calendar object containing the date to compute the nautical sunrise for.
        Returns:
        the nautical sunrise time as a Calendar
      • getNauticalSunsetForDate

        public java.lang.String getNauticalSunsetForDate(java.util.Calendar date)
        Returns the nautical (102deg) sunset for the given date.
        Parameters:
        date - Calendar object containing the date to compute the nautical sunset for.
        Returns:
        the nautical sunset time in HH:MM (24-hour clock) form.
      • getNauticalSunsetCalendarForDate

        public java.util.Calendar getNauticalSunsetCalendarForDate(java.util.Calendar date)
        Returns the nautical (102deg) sunset for the given date.
        Parameters:
        date - Calendar object containing the date to compute the nautical sunset for.
        Returns:
        the nautical sunset time as a Calendar
      • getCivilSunriseForDate

        public java.lang.String getCivilSunriseForDate(java.util.Calendar date)
        Returns the civil sunrise (twilight, 96deg) for the given date.
        Parameters:
        date - Calendar object containing the date to compute the civil sunrise for.
        Returns:
        the civil sunrise time in HH:MM (24-hour clock) form.
      • getCivilSunriseCalendarForDate

        public java.util.Calendar getCivilSunriseCalendarForDate(java.util.Calendar date)
        Returns the civil sunrise (twilight, 96deg) for the given date.
        Parameters:
        date - Calendar object containing the date to compute the civil sunrise for.
        Returns:
        the civil sunrise time as a Calendar
      • getCivilSunsetForDate

        public java.lang.String getCivilSunsetForDate(java.util.Calendar date)
        Returns the civil sunset (twilight, 96deg) for the given date.
        Parameters:
        date - Calendar object containing the date to compute the civil sunset for.
        Returns:
        the civil sunset time in HH:MM (24-hour clock) form.
      • getCivilSunsetCalendarForDate

        public java.util.Calendar getCivilSunsetCalendarForDate(java.util.Calendar date)
        Returns the civil sunset (twilight, 96deg) for the given date.
        Parameters:
        date - Calendar object containing the date to compute the civil sunset for.
        Returns:
        the civil sunset time as a Calendar
      • getOfficialSunriseForDate

        public java.lang.String getOfficialSunriseForDate(java.util.Calendar date)
        Returns the official sunrise (90deg 50', 90.8333deg) for the given date.
        Parameters:
        date - Calendar object containing the date to compute the official sunrise for.
        Returns:
        the official sunrise time in HH:MM (24-hour clock) form.
      • getOfficialSunriseCalendarForDate

        public java.util.Calendar getOfficialSunriseCalendarForDate(java.util.Calendar date)
        Returns the official sunrise (90deg 50', 90.8333deg) for the given date.
        Parameters:
        date - Calendar object containing the date to compute the official sunrise for.
        Returns:
        the official sunrise time as a Calendar
      • getOfficialSunsetForDate

        public java.lang.String getOfficialSunsetForDate(java.util.Calendar date)
        Returns the official sunrise (90deg 50', 90.8333deg) for the given date.
        Parameters:
        date - Calendar object containing the date to compute the official sunset for.
        Returns:
        the official sunset time in HH:MM (24-hour clock) form.
      • getOfficialSunsetCalendarForDate

        public java.util.Calendar getOfficialSunsetCalendarForDate(java.util.Calendar date)
        Returns the official sunrise (90deg 50', 90.8333deg) for the given date.
        Parameters:
        date - Calendar object containing the date to compute the official sunset for.
        Returns:
        the official sunset time as a Calendar
      • getSunrise

        public static java.util.Calendar getSunrise(double latitude,
                                                    double longitude,
                                                    java.util.TimeZone timeZone,
                                                    java.util.Calendar date,
                                                    double degrees)
        Computes the sunrise for an arbitrary declination.
        Parameters:
        latitude -
        longitude - Coordinates for the location to compute the sunrise/sunset for.
        timeZone - timezone to compute the sunrise/sunset times in.
        date - Calendar object containing the date to compute the official sunset for.
        degrees - Angle under the horizon for which to compute sunrise. For example, "civil sunrise" corresponds to 6 degrees.
        Returns:
        the requested sunset time as a Calendar object.
      • getSunset

        public static java.util.Calendar getSunset(double latitude,
                                                   double longitude,
                                                   java.util.TimeZone timeZone,
                                                   java.util.Calendar date,
                                                   double degrees)
        Computes the sunset for an arbitrary declination.
        Parameters:
        latitude -
        longitude - Coordinates for the location to compute the sunrise/sunset for.
        timeZone - timezone to compute the sunrise/sunset times in.
        date - Calendar object containing the date to compute the official sunset for.
        degrees - Angle under the horizon for which to compute sunrise. For example, "civil sunset" corresponds to 6 degrees.
        Returns:
        the requested sunset time as a Calendar object.
      • getLocation

        public Location getLocation()
        Returns the location where the sunrise/sunset is calculated for.
        Returns:
        Location object representing the location of the computed sunrise/sunset.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.