public class TimeUnit extends Unit
Modifier and Type | Field and 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 and Description |
---|
TimeUnit(String label,
String textName,
String symbol,
double extentInSeconds,
String description)
Constructor.
|
Modifier and Type | Method and 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.
|
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(String label, String textName, String symbol, double extentInSeconds, 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 © 2024 Central Laboratory of the Research Councils. All Rights Reserved.