Package edu.ie3.datamodel.models
Class OperationTime.OperationTimeBuilder
java.lang.Object
edu.ie3.datamodel.models.OperationTime.OperationTimeBuilder
- Enclosing class:
- OperationTime
Builder class for
OperationTime
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build anOperationTime
instance from the given parameters
If both time frame bounds, start and end date, are not set, the OperationTime is regarded not limitedwithEnd
(ZonedDateTime endDate) Set the date of operation endwithOperationTime
(edu.ie3.util.interval.ClosedInterval<ZonedDateTime> timeInterval) Set dates of operation start and end from intervalwithStart
(ZonedDateTime startDate) Set the date of operation start
-
Constructor Details
-
OperationTimeBuilder
public OperationTimeBuilder()
-
-
Method Details
-
withStart
Set the date of operation start- Parameters:
startDate
- Beginning of the operation period- Returns:
- Reference to the same builder with adjusted start date
-
withEnd
Set the date of operation end- Parameters:
endDate
- End of the operation period- Returns:
- Reference to the same builder with adjusted end date
-
withOperationTime
public OperationTime.OperationTimeBuilder withOperationTime(edu.ie3.util.interval.ClosedInterval<ZonedDateTime> timeInterval) Set dates of operation start and end from interval- Parameters:
timeInterval
- Foreseen operation time interval- Returns:
- Reference to the same builder with adjusted start and end date
-
build
Build anOperationTime
instance from the given parameters
If both time frame bounds, start and end date, are not set, the OperationTime is regarded not limited- Returns:
- A ready to use operation time
-