|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
stella.parameter.AbstractParameter
stella.parameter.AbstractValue
stella.parameter.Jd
public class Jd
Represents the current time as julian date. Does not need the
Time as a registered variable. Is meant as a convenience replacement
for the more generic Time global. Note that this class can be easily
tailored for the use of mjd. Providing a properties object which a
specifies the key KEY_BASEJD pointing to 40587 makes the jd
global produce mjd. Note that the key KEY_BASEJD points to the jd,
mjd, tjd, of Jan. 1st 1970, 0h00 GMT.
| Nested Class Summary | |
|---|---|
static class |
Jd.Test
Test class. |
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
protected double |
base
The private copy of the base jd as a double. |
static double |
DEFBASEJD
The default jd of Jan. |
static String |
DEFNAME
The name of this global (jd). |
private static String |
DEFTIME
The name of the time global. |
private static DecimalFormat |
df
The jd-formatter. |
static String |
KEY_BASEJD
The key mapping to the jd of Jan. |
static String |
KEY_TIME
The name of the latitude to use. |
private Time |
time
The time parameter, if registered. |
| Fields inherited from class stella.parameter.AbstractParameter |
|---|
KEY_FORMAT, KEY_NAME, KEY_PRESERVE, UNKNOWN |
| Fields inherited from class util.PropertyBundles |
|---|
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES |
| Fields inherited from class util.PropertyResources |
|---|
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset |
| Fields inherited from class util.PropertyContainer |
|---|
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR |
| Fields inherited from interface util.PropertySupplying |
|---|
CONFIG, KEY_CLASS |
| Fields inherited from interface util.ResourceSupplying |
|---|
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Constructor Summary | |
|---|---|
Jd(Map define)
Constructs a new global representing julian date. |
|
| Method Summary | |
|---|---|
Double |
getAscendTime(Number until)
Returns the remaining time in ms. |
static double |
getJd(Date f)
Static access for converting a date into a standard JD. |
static double |
getJd(long ms)
Static access for converting a unix time stamp into a standard JD. |
Number |
getValue()
Returns the actual jd as a double. |
void |
registerParameter(Parameter curtime)
A parameter depending command should drain the necessarry information to get valid out of a parameter value. |
double |
rescanned(String key,
String old,
String newval)
It is not possible to rescan the time parameter name. |
Number |
setValue(Number val)
Sets the jd. |
| Methods inherited from class stella.parameter.AbstractValue |
|---|
get, set |
| Methods inherited from class stella.parameter.AbstractParameter |
|---|
createParameter, delivers, exit, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, init, register, setName, toString |
| Methods inherited from class util.PropertyBundles |
|---|
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource |
| Methods inherited from class util.PropertyResources |
|---|
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet |
| Methods inherited from class util.PropertyContainer |
|---|
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, setObject, setProperties, setProperty, stringProperties |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface util.Reloadable |
|---|
reload |
| Methods inherited from interface stella.Parameter |
|---|
getFormatted, getName, getString |
| Methods inherited from interface util.PropertySupplying |
|---|
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties |
| Methods inherited from interface util.Initializable |
|---|
init |
| Methods inherited from interface util.ResourceSupplying |
|---|
getResource, getResourceAsStream, getResources |
| Field Detail |
|---|
public static final String KEY_BASEJD
public static final String KEY_TIME
private static final String DEFTIME
public static final double DEFBASEJD
public static final String DEFNAME
private static final DecimalFormat df
protected double base
private Time time
| Constructor Detail |
|---|
public Jd(Map define)
KEY_BASEJD to 40587 makes this
object produce mjd.
| Method Detail |
|---|
public double rescanned(String key,
String old,
String newval)
rescanned in interface Reloadablerescanned in class AbstractParameterpublic void registerParameter(Parameter curtime)
ParameterDepending
registerParameter in interface ParameterDepending
public Number setValue(Number val)
throws UnsupportedOperationException
setValue in interface ValueUnsupportedOperationExceptionpublic Number getValue()
getValue in interface Valuepublic static double getJd(Date f)
public static double getJd(long ms)
public Double getAscendTime(Number until)
getAscendTime in interface Increasing<Number>until - A Number carrying the date
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||