| Modifier and Type | Field and Description |
|---|---|
static DurationFormat |
DEFAULT_FORMAT
The default
DurationFormat to be applied. |
| Modifier and Type | Method and Description |
|---|---|
static String |
format(Duration duration)
Returns a string representation of the given
Duration using default format. |
static String |
format(Duration duration,
DurationFormat format)
Returns a string representation of the given
Duration with a specific format. |
static String |
format(Duration duration,
DurationFormat format,
boolean printLegend)
Returns a string representation of the given
Duration with a specific format. |
public static final DurationFormat DEFAULT_FORMAT
DurationFormat to be applied.public static final String format(Duration duration)
Duration using default format.duration - the Duration to be formattedNullPointerException - if the specified duration is nullpublic static final String format(Duration duration, DurationFormat format)
Duration with a specific format.
Note: This is equivalent to calling:
DurationFormatter.format(duration, format, true)
duration - the Duration to be formattedformat - the DurationFormat to be appliedNullPointerException - if either the specified duration or format is nullpublic static final String format(Duration duration, DurationFormat format, boolean printLegend)
Duration with a specific format.duration - the Duration to be formattedformat - the DurationFormat to be appliedprintLegend - a flag indicating whether of not to include a legend in the
generated stringNullPointerException - if wither of the specified duration or format is nullCopyright © 2022. All rights reserved.