Documentation of 'com.luckycatlabs.sunrisesunset.calculator.SolarEventCalculator' Java class
SolarEventCalculator
com.luckycatlabs.sunrisesunset.calculator

Class SolarEventCalculator



  • public class SolarEventCalculator
    extends java.lang.Object
    Parent class of the Sunrise and Sunset calculator classes.
    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.util.Calendar computeSunriseCalendar(Zenith solarZenith, java.util.Calendar date)
      Computes the sunrise time for the given zenith at the given date.
      java.lang.String computeSunriseTime(Zenith solarZenith, java.util.Calendar date)
      Computes the sunrise time for the given zenith at the given date.
      java.util.Calendar computeSunsetCalendar(Zenith solarZenith, java.util.Calendar date)
      Computes the sunset time for the given zenith at the given date.
      java.lang.String computeSunsetTime(Zenith solarZenith, java.util.Calendar date)
      Computes the sunset time for the given zenith at the given date.
      • Methods inherited from class java.lang.Object

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

      • SolarEventCalculator

        public SolarEventCalculator(Location location,
                                    java.lang.String timeZoneIdentifier)
        Constructs a new SolarEventCalculator using the given parameters.
        Parameters:
        location - Location of the place where the solar event should be calculated from.
        timeZoneIdentifier - time zone identifier of the timezone of the location parameter. For example, "America/New_York".
      • SolarEventCalculator

        public SolarEventCalculator(Location location,
                                    java.util.TimeZone timeZone)
        Constructs a new SolarEventCalculator using the given parameters.
        Parameters:
        location - Location of the place where the solar event should be calculated from.
        timeZone - timezone of the location parameter.
    • Method Detail

      • computeSunriseTime

        public java.lang.String computeSunriseTime(Zenith solarZenith,
                                                   java.util.Calendar date)
        Computes the sunrise time for the given zenith at the given date.
        Parameters:
        solarZenith - Zenith enum corresponding to the type of sunrise to compute.
        date - Calendar object representing the date to compute the sunrise for.
        Returns:
        the sunrise time, in HH:MM format (24-hour clock), 00:00 if the sun does not rise on the given date.
      • computeSunriseCalendar

        public java.util.Calendar computeSunriseCalendar(Zenith solarZenith,
                                                         java.util.Calendar date)
        Computes the sunrise time for the given zenith at the given date.
        Parameters:
        solarZenith - Zenith enum corresponding to the type of sunrise to compute.
        date - Calendar object representing the date to compute the sunrise for.
        Returns:
        the sunrise time as a calendar or null for no sunrise
      • computeSunsetTime

        public java.lang.String computeSunsetTime(Zenith solarZenith,
                                                  java.util.Calendar date)
        Computes the sunset time for the given zenith at the given date.
        Parameters:
        solarZenith - Zenith enum corresponding to the type of sunset to compute.
        date - Calendar object representing the date to compute the sunset for.
        Returns:
        the sunset time, in HH:MM format (24-hour clock), 00:00 if the sun does not set on the given date.
      • computeSunsetCalendar

        public java.util.Calendar computeSunsetCalendar(Zenith solarZenith,
                                                        java.util.Calendar date)
        Computes the sunset time for the given zenith at the given date.
        Parameters:
        solarZenith - Zenith enum corresponding to the type of sunset to compute.
        date - Calendar object representing the date to compute the sunset for.
        Returns:
        the sunset time as a Calendar or null for no sunset.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.