public static enum Duration.FormatStyle extends Enum<Duration.FormatStyle>
| Enum Constant and Description |
|---|
FULL
Formats a time duration in the following format:
H:M:s:ns. |
SHORT
Formats a time duration in either of the following formats:
H:M:s:ns,
M:S:ns, or S.ns. |
| Modifier and Type | Method and Description |
|---|---|
abstract String |
format(Duration duration,
boolean printLegend)
Formats a time duration.
|
static Duration.FormatStyle |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Duration.FormatStyle[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Duration.FormatStyle FULL
H:M:s:ns. For example:
'01:59:59.987654321'.public static final Duration.FormatStyle SHORT
H:M:s:ns,
M:S:ns, or S.ns. The algorithm always chooses the shortest possible
format that can represent a time duration.public static Duration.FormatStyle[] values()
for (Duration.FormatStyle c : Duration.FormatStyle.values()) System.out.println(c);
public static Duration.FormatStyle 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 nullCopyright © 2020. All rights reserved.