stella.parameter
Class Time
java.lang.Object
util.PropertyContainer
util.PropertyResources
util.PropertyBundles
stella.parameter.AbstractParameter
stella.parameter.AbstractValue
stella.parameter.AbstractTime
stella.parameter.Time
- All Implemented Interfaces:
- Cloneable, Parameter, Increasing<Number>, Value, ExitCleaning, Initializable, LocalizedSupplying, PropertySupplying, Reloadable, ResourceSupplying
- Direct Known Subclasses:
- SettableTime
public class Time
- extends AbstractTime
- implements Increasing<Number>
A general variable representing time. Extends the AbstractValue base
class. Does not need any registereed additional Parameters.
|
Field Summary |
static String |
DEFNAME
The name of this global (time). |
| Methods inherited from class stella.parameter.AbstractParameter |
createParameter, delivers, exit, getFormatted, getName, getPreserveFile, getString, getString, init, register, setName, toString |
| 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 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 |
DEFNAME
public static final String DEFNAME
- The name of this global (time).
- See Also:
- Constant Field Values
Time
public Time(Map<String,String> prop)
- Constructs a new global representing time.
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
getTime
public Date getTime()
- Returns the time as a date object.
getAscendTime
public Double getAscendTime(Number until)
- Returns the remaining time in ms.
- Specified by:
getAscendTime in interface Increasing<Number>
- Parameters:
until - The value in the future.
- Returns:
- A double carrying the remaining time or null if the time
cannot be calculated.