public class DurationParser extends Object
Duration
.Constructor and Description |
---|
DurationParser() |
Modifier and Type | Method and Description |
---|---|
static String |
formatDuration(Duration duration)
Format a
Duration into the Go format representation. |
static Duration |
parseDuration(String duration)
Parse a Go format duration into a
Duration object. |
@Nullable public static Duration parseDuration(String duration)
Duration
object.duration
- the duration string to parse in Go's duration format.duration
is empty.IllegalArgumentException
- if unable to parse the requested duration.Copyright © 2016–2024 Pivotal Software, Inc.. All rights reserved.