|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.tudelft.simulation.dsol.experiment.TimeUnit
public class TimeUnit
The TimeUnitInterface defines the simulator time units.
(c) copyright 2002-2005 Delft
University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser
General Public License (LGPL) , no warranty.
Field Summary |
---|
Fields inherited from interface nl.tudelft.simulation.dsol.experiment.TimeUnitInterface |
---|
DAY, HOUR, MILLISECOND, MINUTE, SECOND, UNIT, WEEK |
Constructor Summary | |
---|---|
TimeUnit(long value,
String name)
Method Speed. |
Method Summary | |
---|---|
static double |
convert(double amount,
TimeUnitInterface units,
SimulatorInterface simulator)
converts amount units to the units of the simulator |
static double |
convert(double amount,
TimeUnitInterface units,
TimeUnitInterface targetUnits)
converts amount units to the target units |
long |
getValue()
Method getValue.This method returns the number of timeunits relative to milliseconds |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TimeUnit(long value, String name)
value
- represents the number of milisecondsname
- The name that will show up in reports and animationMethod Detail |
---|
public long getValue()
TimeUnitInterface
getValue
in interface TimeUnitInterface
TimeUnitInterface.getValue()
public String toString()
toString
in class Object
Object.toString()
public static double convert(double amount, TimeUnitInterface units, SimulatorInterface simulator) throws RemoteException
amount
- the amount to convertunits
- the units of the amountsimulator
- the simulator
RemoteException
- on network exceptionpublic static double convert(double amount, TimeUnitInterface units, TimeUnitInterface targetUnits)
amount
- the amount to convertunits
- the units of the amounttargetUnits
- the units to convert to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |