Package org.sonar.api.impl.utils
Class WorkDuration
java.lang.Object
org.sonar.api.impl.utils.WorkDuration
- All Implemented Interfaces:
Serializable
- Since:
- 4.2
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionadd
(WorkDuration with) static WorkDuration
create
(int days, int hours, int minutes, int hoursInDay) static WorkDuration
createFromValueAndUnit
(int value, WorkDuration.UNIT unit, int hoursInDay) int
days()
boolean
int
hashCode()
int
hours()
int
minutes()
multiply
(int factor) subtract
(WorkDuration with) long
toLong()
Return the duration using the following format DDHHMM, where DD is the number of days, HH is the number of months, and MM the number of minutes.long
toString()
double
Return the duration in number of working days.
-
Method Details
-
create
-
createFromValueAndUnit
public static WorkDuration createFromValueAndUnit(int value, WorkDuration.UNIT unit, int hoursInDay) -
toWorkingDays
public double toWorkingDays()Return the duration in number of working days. For instance, 3 days and 4 hours will return 3.5 days (if hoursIndDay is 8). -
toLong
public long toLong()Return the duration using the following format DDHHMM, where DD is the number of days, HH is the number of months, and MM the number of minutes. For instance, 3 days and 4 hours will return 030400 (if hoursIndDay is 8). -
toMinutes
public long toMinutes() -
add
-
subtract
-
multiply
-
days
public int days() -
hours
public int hours() -
minutes
public int minutes() -
equals
-
hashCode
public int hashCode() -
toString
-