public class TimeUnit extends Unit
Modifier and Type | Field | Description |
---|---|---|
static TimeUnit |
DAY |
Day (24 hours).
|
static TimeUnit |
HOUR |
Hour.
|
static TimeUnit |
MICRO |
Microsecond.
|
static TimeUnit |
MILLI |
Millisecond.
|
static TimeUnit |
MINUTE |
Minute.
|
static TimeUnit |
MONTH |
Month (1/12 year).
|
static TimeUnit |
QUARTER |
Quarter (1/4 year).
|
static TimeUnit |
SECOND |
Second.
|
static TimeUnit |
WEEK |
Week (7 days).
|
static TimeUnit |
YEAR |
Year (365.25 days).
|
Constructor | Description |
---|---|
TimeUnit(java.lang.String label,
java.lang.String textName,
java.lang.String symbol,
double extentInSeconds,
java.lang.String description) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
static PerUnitConfigKey<Unit> |
createHistogramConfigKey() |
Returns a new config key for choosing a TimeUnit.
|
double |
getExtentInSeconds() |
Returns the extent in seconds.
|
static TimeUnit[] |
getKnownValues() |
Returns a list of known TimeUnit instances.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
equals, getDescription, getExtent, getLabel, getSymbol, getTextName, hashCode, toString
public static final TimeUnit MICRO
public static final TimeUnit MILLI
public static final TimeUnit SECOND
public static final TimeUnit MINUTE
public static final TimeUnit HOUR
public static final TimeUnit DAY
public static final TimeUnit WEEK
public static final TimeUnit MONTH
public static final TimeUnit QUARTER
public static final TimeUnit YEAR
public TimeUnit(java.lang.String label, java.lang.String textName, java.lang.String symbol, double extentInSeconds, java.lang.String description)
label
- text to appear in a selection interfacetextName
- text to appear in user-directed descriptive textsymbol
- text to appear as unit metadata,
preferably compatible with the VOUnit standardextentInSeconds
- extent in units of secondsdescription
- descriptive text for XML documentationpublic double getExtentInSeconds()
public static TimeUnit[] getKnownValues()
public static PerUnitConfigKey<Unit> createHistogramConfigKey()
Copyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.