@KwrkImmutable @CompileStatic class RouteSpecification extends Object implements PostMapConstructorCheckable
Represents route specification.
Contains data which is core input for searching suitable and available routes for a cargo.Type | Name and description |
---|---|
Instant |
arrivalLatestTime The latest time when cargo has to arrive at the destination. |
Instant |
creationTime Time of creation of this instance. |
Instant |
departureEarliestTime The earliest time when cargo can be departed. |
Instant |
departureLatestTime The latest time when cargo has to be departed. |
Location |
destinationLocation Location to which cargo should be shipped. |
Location |
originLocation Location from which the cargo should be picked up. |
Constructor and description |
---|
RouteSpecification() |
Type Params | Return Type | Name and description |
---|---|---|
|
static RouteSpecification |
make(Location originLocation, Location destinationLocation, Instant departureEarliestTime, Instant departureLatestTime, Instant arrivalLatestTime, Clock creationTimeClock) Creates RouteSpecification instance and adjust input values as necessary. |
|
void |
postMapConstructorCheck(Map<String, ?> constructorArguments) |
The latest time when cargo has to arrive at the destination.
This instant should be rounded to the hour (minutes, seconds and nanos set to 0).Time of creation of this instance.
During construction it is used as an equivalent of current system time for time based calculations.The earliest time when cargo can be departed.
This instant should be rounded to the hour (minutes, seconds and nanos set to 0). This instant indicates the earliest time in which customer can prepare a cargo ready to be shipped.The latest time when cargo has to be departed.
This instant should be rounded to the hour (minutes, seconds and nanos set to 0). This time indicates the latest time when cargo should be shipped or otherwise packaged commodities can go bad.Location to which cargo should be shipped.
Location from which the cargo should be picked up.
Creates RouteSpecification instance and adjust input values as necessary.
IfdepartureEarliestTime
contains non-zero minutes, seconds or nanos, departureEarliestTime
is rounded up to the next hour.
If departureLatestTime
contains non-zero minutes, seconds or nanos, departureLatestTime
is rounded up to the next hour.
Groovy Documentation