stella.parameter
Class AcceleratedJd
java.lang.Object
util.PropertyContainer
stella.parameter.AbstractParameter
stella.parameter.AbstractValue
stella.parameter.Jd
stella.parameter.AcceleratedJd
- All Implemented Interfaces:
- Cloneable, Parameter, Increasing, ParameterDepending, Value, ExitCleaning, Initializable, PropertyBearing, Reloadable
public class AcceleratedJd
- extends 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 Jd.KEY_BASEJD pointing to
40587 makes the jd global produce mjd. Note that the key
Jd.KEY_BASEJD points to the jd, mjd, tjd, of Jan. 1st 1970, 0h00 GMT.
| Nested classes/interfaces inherited from class stella.parameter.Jd |
Jd.Test |
|
Constructor Summary |
AcceleratedJd(Map define)
Constructs a new global representing julian date. |
| 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.PropertyContainer |
augment, augment, augment, clone, createFrom, createFrom, createFrom, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getLocalClassLoader, getLocalized, getLocalized, getLocalizedString, getLocalizedString, getProperties, getPropertiesToKey, getPropertiesToKey, getProperty, getResource, getResourceAsStream, getResourceFromKey, getResources, has, isNew, keyCreate, keyCreate, parseObject, reload, reload, removeProperty, setObject, setProperties, setProperty, stringProperties |
| Methods inherited from interface util.PropertyBearing |
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getLocalized, getProperties, getProperty, getResource, getResourceAsStream, getResources, has, parseObject, removeProperty, setObject, setProperty, stringProperties |
KEY_ACCELERATE
public static final String KEY_ACCELERATE
- The key mapping to the jd of Jan. 1st 1970, 0h00 GMT.
- See Also:
- Constant Field Values
KEY_OFFSET
public static final String KEY_OFFSET
- The key mapping to the starting time offset of the accelerated time.
- See Also:
- Constant Field Values
KEY_DATEFORMAT
public static final String KEY_DATEFORMAT
- The key mapping to the date format to use.
- See Also:
- Constant Field Values
DEFACCELERATE
private static final double DEFACCELERATE
- The default jd of Jan. 1st 1970, 0h00 GMT. (2440587.5)
- See Also:
- Constant Field Values
DEFDATEFORMAT
private static final DateFormat DEFDATEFORMAT
- The default date formatter.
accel
private long accel
- The date when the acceleration starts. Identical to creation time.
offset
private long offset
- The offset date, parsed from the offset given.
AcceleratedJd
public AcceleratedJd(Map define)
- Constructs a new global representing julian date. Providing a properties
object that maps the
Jd.KEY_BASEJD to 40587 makes this
object produce mjd.
rescanned
public double rescanned(String key,
String old,
String newval)
- If offset or date format change, we act.
- Specified by:
rescanned in interface Reloadable- Overrides:
rescanned in class Jd
getValue
public Number getValue()
- Returns the actual jd as a double. The precision should reach ms.
- Specified by:
getValue in interface Value- Overrides:
getValue in class Jd