@ScannerSide @ServerSide @ComputeEngineSide public class Durations extends Object
Internal.durations
Modifier and Type | Class and Description |
---|---|
static class |
Durations.DurationFormat |
Constructor and Description |
---|
Durations(Settings settings,
I18n i18n) |
Modifier and Type | Method and Description |
---|---|
Duration |
create(long minutes)
Create a Duration object from a number of minutes
|
Duration |
decode(String duration)
Convert the text to a Duration
Example : decode("9d 10 h") -> Duration.encode("10d2h") (if sonar.technicalDebt.hoursInDay property is set to 8) |
String |
encode(Duration duration)
Return the string value of the Duration.
|
String |
format(Locale locale,
Duration duration)
Return the formatted work duration.
|
String |
format(Locale locale,
Duration duration,
Durations.DurationFormat format)
Return the formatted work duration.
|
public Duration decode(String duration)
IllegalArgumentException
public String encode(Duration duration)
public String format(Locale locale, Duration duration, Durations.DurationFormat format)
Copyright © 2009–2016 SonarSource. All rights reserved.