stella.parameter
Class AcceleratedTime

java.lang.Object
  extended by util.PropertyContainer
      extended by stella.parameter.AbstractParameter
          extended by stella.parameter.AbstractValue
              extended by stella.parameter.Time
                  extended by stella.parameter.SettableTime
                      extended by stella.parameter.AcceleratedTime
All Implemented Interfaces:
Cloneable, Parameter, Increasing, Value, WeatherDependingParameter, ExitCleaning, Initializable, PropertyBearing, Reloadable

public class AcceleratedTime
extends SettableTime

A general variable representing time. Extends the AbstractValue base class. Does not need any registereed additional Parameters.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyContainer
PropertyContainer.URLResource
 
Field Summary
private  long accel
          The date when the acceleration starts.
static String ACCELSYSPROP
          If acceleration is set, we export to the system properties.
private static double DEFACCELERATE
          The default jd of Jan.
static String KEY_ACCELERATE
          The key mapping to the time acceleration.
 
Fields inherited from class stella.parameter.SettableTime
KEY_DATEFORMAT, KEY_OFFSET, KEY_TIMEZONE, OFFSETSYSPROP
 
Fields inherited from class stella.parameter.Time
DEFNAME, ISO, ISOSTANDARD, UTC
 
Fields inherited from class stella.parameter.AbstractParameter
KEY_FORMAT, KEY_NAME, KEY_PRESERVE, UNKNOWN
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR, KEY_NOINITONCREATE, KEY_RESOURCEBUNDLES
 
Fields inherited from interface util.PropertyBearing
CONFIG, KEY_CLASS, KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Constructor Summary
AcceleratedTime(Map prop)
          Constructs a new global representing accelerated time.
 
Method Summary
 Number getValue()
          Returns the time as an Long object.
 void setAcceleration(double acc)
          Sets the acceleration factor.
 
Methods inherited from class stella.parameter.SettableTime
advance, getForWeather, registerWeather, rescanned, set, setDate, setDate, setJd
 
Methods inherited from class stella.parameter.Time
getAscendTime, getFormatted, getTime, setValue
 
Methods inherited from class stella.parameter.AbstractValue
get
 
Methods inherited from class stella.parameter.AbstractParameter
createParameter, delivers, exit, 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 class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface stella.Parameter
get, getFormatted, getName, getString
 
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
 
Methods inherited from interface util.Initializable
init
 
Methods inherited from interface util.Reloadable
reload
 

Field Detail

KEY_ACCELERATE

public static final String KEY_ACCELERATE
The key mapping to the time acceleration.

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

ACCELSYSPROP

public static final String ACCELSYSPROP
If acceleration is set, we export to the system properties.

See Also:
Constant Field Values

accel

private long accel
The date when the acceleration starts. Identical to creation time.

Constructor Detail

AcceleratedTime

public AcceleratedTime(Map prop)
Constructs a new global representing accelerated time.

Method Detail

getValue

public Number getValue()
Returns the time as an Long object. Querries the system time and wraps it into a Long instance.

Specified by:
getValue in interface Value
Overrides:
getValue in class SettableTime

setAcceleration

public void setAcceleration(double acc)
Sets the acceleration factor.