Enum Class Twilight

java.lang.Object
java.lang.Enum<Twilight>
net.time4j.calendar.astro.Twilight
All Implemented Interfaces:
Serializable, Comparable<Twilight>, java.lang.constant.Constable

public enum Twilight extends Enum<Twilight>

Enumeration of various twilight definitions.

See also Wikipedia.

Since:
3.34/4.29
Author:
Meno Hochschild
  • Enum Constant Details

    • BLUE_HOUR

      public static final Twilight BLUE_HOUR

      Marks the time when the sun is 4 degrees below the horizon.

      Mainly used by photographers. There is no official definition but usually photographers talk about the blue hour when the sun is between 4 and eight degrees below the horizon. See also Wikipedia.

    • CIVIL

      public static final Twilight CIVIL

      Marks the time when the sun is 6 degrees below the horizon.

    • NAUTICAL

      public static final Twilight NAUTICAL

      Marks the time when the sun is 12 degrees below the horizon.

    • ASTRONOMICAL

      public static final Twilight ASTRONOMICAL

      Marks the time when the sun is 18 degrees below the horizon.

      Is the sun even deeper below the horizon then people talk about night.

  • Method Details

    • values

      public static Twilight[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Twilight valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null