public class DayValue
extends java.lang.Object
Final day value is calculated as: day + time. DayValue is only a tuple holding these two values.
It has no domain meaning by itself. Therefore, it can hold a Julian day value, Modified Julian day value,
or any other day value. It also does not recalculate time value to be in the range [0, 1).
| Constructor and Description |
|---|
DayValue(int day,
double time)
Creates a new day value.
|
| Modifier and Type | Method and Description |
|---|---|
int |
day()
Returns integer part of the day.
|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
double |
time()
Returns the fraction part of day.
|
java.math.BigDecimal |
toBigDecimal()
Converts day value to BigDecimal.
|
double |
toDouble()
Converts day value to less precise double value.
|
java.lang.String |
toString() |
public DayValue(int day,
double time)
day - integer part of the daytime - fraction part of the daypublic int day()
public double time()
public double toDouble()
public java.math.BigDecimal toBigDecimal()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object