|
|
@@ -25,6 +25,8 @@ public class Leg implements ValueObject<Leg> {
|
|
25
|
25
|
Validate.notNull(voyage, "Voyage is required");
|
|
26
|
26
|
Validate.notNull(loadLocation, "Load location is required");
|
|
27
|
27
|
Validate.notNull(unloadLocation, "Unload location is required");
|
|
|
28
|
+ Validate.notNull(loadTime, "Load time is required");
|
|
|
29
|
+ Validate.notNull(unloadTime, "Unload time is required");
|
|
28
|
30
|
Validate.isTrue(!loadLocation.sameIdentityAs(unloadLocation));
|
|
29
|
31
|
// TODO use a minimum time between unloading and loading?
|
|
30
|
32
|
Validate.isTrue(unloadTime.after(loadTime));
|
|
|
@@ -118,7 +120,7 @@ public class Leg implements ValueObject<Leg> {
|
|
118
|
120
|
@Override
|
|
119
|
121
|
public String toString() {
|
|
120
|
122
|
return "Load in " + loadLocation + " at " + loadTime +
|
|
121
|
|
- ", unload in " + unloadLocation + " at " + unloadTime;
|
|
|
123
|
+ " --- Unload in " + unloadLocation + " at " + unloadTime;
|
|
122
|
124
|
}
|
|
123
|
125
|
|
|
124
|
126
|
Leg() {
|