| Enum Constant and Description |
|---|
FIRST_QUARTER
Marks the first quarter moon.
|
FULL_MOON
Marks the full moon.
|
LAST_QUARTER
Marks the last quarter moon.
|
NEW_MOON
Phase of new moon.
|
| Modifier and Type | Method and Description |
|---|---|
Moment |
after(Moment moment)
Obtains the first moon phase which is after given moment.
|
Moment |
atLunation(int n)
Obtains the time of n-th lunation based on this type of phase.
|
Moment |
atOrAfter(Moment moment)
Obtains the first moon phase which is at or after given moment.
|
Moment |
before(Moment moment)
Obtains the last moon phase which is still before given moment.
|
static double |
getIllumination(Moment moment)
Determines the degree of illumination of the moon at given moment.
|
static int |
maxLunation()
Obtains the maximum supported lunation.
|
static int |
minLunation()
Obtains the minimum supported lunation.
|
static MoonPhase |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static MoonPhase[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MoonPhase NEW_MOON
Phase of new moon.
public static final MoonPhase FIRST_QUARTER
Marks the first quarter moon.
public static final MoonPhase FULL_MOON
Marks the full moon.
public static final MoonPhase LAST_QUARTER
Marks the last quarter moon.
public static MoonPhase[] values()
for (MoonPhase c : MoonPhase.values()) System.out.println(c);
public static MoonPhase valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic Moment after(Moment moment)
Obtains the first moon phase which is after given moment.
moment - the moment to be compared withjava.lang.IllegalArgumentException - if the associated year is not in the range -2000 <= year <= 3000public Moment atOrAfter(Moment moment)
Obtains the first moon phase which is at or after given moment.
moment - the moment to be compared withjava.lang.IllegalArgumentException - if the associated year is not in the range -2000 <= year <= 3000public Moment before(Moment moment)
Obtains the last moon phase which is still before given moment.
moment - the moment to be compared withjava.lang.IllegalArgumentException - if the associated year is not in the range -2000 <= year <= 3000public static int minLunation()
Obtains the minimum supported lunation.
atLunation(int)public static int maxLunation()
Obtains the maximum supported lunation.
atLunation(int)public Moment atLunation(int n)
Obtains the time of n-th lunation based on this type of phase.
The parameter value n = 0 will determine the first phase after the calendar date 2000-01-01.
For example, the expression NEW_MOON.atLunation(0) calculates the first new moon in year 2000
which is on the date 2000-01-06 (UTC). The lunation parameter should be chosen within the range
minLunation() <= n <= maxLunation().
n - count of lunations (distance between two consecutive moon phases of same type)java.lang.IllegalArgumentException - if the associated year is not in the range -2000 <= year <= 3000minLunation(),
maxLunation()public static double getIllumination(Moment moment)
Determines the degree of illumination of the moon at given moment.
The accuracy is limited to percent values (two digits after decimal point).
moment - universal time0.00 <= i <= 1.00