public class TimeUnit extends LinearUnit<TimeUnit>
Copyright (c) 2015-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.
$LastChangedDate: 2016-05-28 14:25:52 +0200 (Sat, 28 May 2016) $, @version $Revision: 202 $, by $Author: averbraeck $,
initial version May 15, 2014
| Modifier and Type | Field and Description |
|---|---|
static TimeUnit |
DAY
day.
|
static TimeUnit |
HOUR
hour.
|
static TimeUnit |
MILLISECOND
millisecond.
|
static TimeUnit |
MINUTE
minute.
|
static TimeUnit |
SECOND
second.
|
static TimeUnit |
SI
The SI unit for time is second.
|
static TimeUnit |
WEEK
week.
|
scale, STANDARD_UNITS| Constructor and Description |
|---|
TimeUnit(String name,
String abbreviation,
UnitSystem unitSystem,
TimeUnit referenceUnit,
double conversionFactorToReferenceUnit)
Build a user-defined TimeUnit with a conversion factor to another TimeUnit.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getSICoefficientsString() |
TimeUnit |
getStandardUnit() |
getConversionFactorToStandardUnit, getScaleequals, getAbbreviation, getAbbreviationKey, getAllUnitsOfThisType, getName, getNameKey, getSICoefficients, getUnits, getUnitSystem, hashCode, isLocalizable, lookupOrCreateSIUnitWithSICoefficients, lookupOrCreateUnitWithSICoefficients, lookupUnitWithSICoefficients, toStringpublic static final TimeUnit SI
public static final TimeUnit SECOND
public static final TimeUnit MILLISECOND
public static final TimeUnit MINUTE
public static final TimeUnit HOUR
public static final TimeUnit DAY
public static final TimeUnit WEEK
public TimeUnit(String name, String abbreviation, UnitSystem unitSystem, TimeUnit referenceUnit, double conversionFactorToReferenceUnit)
name - the long name of the unitabbreviation - the abbreviation of the unitunitSystem - the unit system, e.g. SI or ImperialreferenceUnit - the unit to convert toconversionFactorToReferenceUnit - multiply a value in this unit by the factor to convert to the given reference unitpublic final TimeUnit getStandardUnit()
getStandardUnit in class Unit<TimeUnit>public final String getSICoefficientsString()
getSICoefficientsString in class Unit<TimeUnit>Copyright © 2015–2016 Delft University of Technology. All rights reserved.