public enum Twilight extends Enum<Twilight>
Enumeration of various twilight definitions.
See also Wikipedia.
| Enum Constant and Description |
|---|
ASTRONOMICAL
Marks the time when the sun is 18 degrees below the horizon.
|
BLUE_HOUR
Marks the time when the sun is 4 degrees below the horizon.
|
CIVIL
Marks the time when the sun is 6 degrees below the horizon.
|
NAUTICAL
Marks the time when the sun is 12 degrees below the horizon.
|
| Modifier and Type | Method and Description |
|---|---|
static Twilight |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Twilight[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
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.
public static final Twilight CIVIL
Marks the time when the sun is 6 degrees below the horizon.
public static final Twilight NAUTICAL
Marks the time when the sun is 12 degrees below the horizon.
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.
public static Twilight[] values()
for (Twilight c : Twilight.values()) System.out.println(c);
public static Twilight valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2014–2021. All rights reserved.