public enum TimestampUnit extends Enum<TimestampUnit>
Enum Constant and Description |
---|
Microseconds
Microsecond.
|
Milliseconds
Millisecond.
|
Nanoseconds
Nanosecond.
|
Seconds
Second.
|
Modifier and Type | Method and Description |
---|---|
String |
getFractionFormatLine()
Format line for the fraction part.
|
int |
getPrecision()
Precision of the unit.
|
int |
getUnitsPerSecond()
Number of units per second.
|
static TimestampUnit |
selectByWidth(int width)
Select unit by width of the fractional part.
|
static TimestampUnit |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TimestampUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TimestampUnit Seconds
public static final TimestampUnit Milliseconds
public static final TimestampUnit Microseconds
public static final TimestampUnit Nanoseconds
public static TimestampUnit[] values()
for (TimestampUnit c : TimestampUnit.values()) System.out.println(c);
public static TimestampUnit valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getUnitsPerSecond()
public static TimestampUnit selectByWidth(int width)
width
- width of the fractional part.public int getPrecision()
public String getFractionFormatLine()
Copyright © 2005–2024 Onix Solutions. All rights reserved.