public final class DaysToWorkingDaysConverter extends Object
ReportLineItemDefinitions the converter creates a "table" with integer that represents the age in days from
the largest lower limit until the smallest upper limit of the reportLineItemDefinitions. This table is valid for a
whole day until the converter is initialized with bigger limits.| Modifier and Type | Method and Description |
|---|---|
int |
convertDaysToWorkingDays(int ageInDays)
Converts an integer, that represents the age in days, to the age in working days by using the table that was
created by initialization.
|
static DaysToWorkingDaysConverter |
initialize(List<ReportLineItemDefinition> reportLineItemDefinitions)
Initializes the DaysToWorkingDaysConverter for a list of
ReportLineItemDefinitions and the current day. |
static DaysToWorkingDaysConverter |
initialize(List<ReportLineItemDefinition> reportLineItemDefinitions,
java.time.Instant referenceDate)
Initializes the DaysToWorkingDaysConverter for a list of
ReportLineItemDefinitions and a referenceDate. |
public static DaysToWorkingDaysConverter initialize(List<ReportLineItemDefinition> reportLineItemDefinitions)
ReportLineItemDefinitions and the current day. A
new table is only created if there are bigger limits or the date has changed.reportLineItemDefinitions - a list of ReportLineItemDefinitions that determines the size of the tablepublic static DaysToWorkingDaysConverter initialize(List<ReportLineItemDefinition> reportLineItemDefinitions, java.time.Instant referenceDate)
ReportLineItemDefinitions and a referenceDate. A
new table is only created if there are bigger limits or the date has changed.reportLineItemDefinitions - a list of ReportLineItemDefinitions that determines the size of the tablereferenceDate - a Instant that represents the current day of the tablepublic int convertDaysToWorkingDays(int ageInDays)
ageInDays - represents the age in daysCopyright © 2018. All rights reserved.