Skip to content

Commit f217386

Browse files
authored
Merge pull request matsim-org#3646 from matsim-org/kmt_removeDeprecatedBuilder
Freight (Carrier): Remove long-time deprecated Builder
2 parents 1691f8a + 060dde9 commit f217386

File tree

1 file changed

+2
-32
lines changed

1 file changed

+2
-32
lines changed

contribs/freight/src/main/java/org/matsim/freight/carriers/CarrierShipment.java

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -62,28 +62,10 @@ public static class Builder {
6262
private TimeWindow deliveryStartsTimeWindow = TimeWindow.newInstance(0.0, Integer.MAX_VALUE);
6363
private double deliveryDuration = 0.0;
6464

65-
6665
/**
67-
* @deprecated Please use Builder newInstance(Id<CarrierShipment> id, Id<Link> from, Id<Link> to, int size) instead.
68-
* <p>
6966
* Returns a new shipment builder.
70-
* <p> The builder is init with the shipment's origin (from), destination (to) and with the shipment's size.
71-
* The default-value for serviceTime is 0.0. The default-value for a timeWindow is [start=0.0, end=Double.maxValue()].
72-
*
73-
* @param from the origin
74-
* @param to the destination
75-
* @param size size of the shipment
76-
* @return the builder
77-
*/
78-
@Deprecated
79-
public static Builder newInstance(Id<Link> from, Id<Link> to, int size){
80-
var id = Id.create(CarrierConstants.SHIPMENT +"_" + from.toString() + "_" + to.toString(), CarrierShipment.class);
81-
return new Builder(id, from,to,size);
82-
}
83-
84-
/**
85-
* Returns a new shipment builder.
86-
* <p> The builder is init with the shipment's origin (from), destination (to) and with the shipment's demand.
67+
* <p>
68+
* The builder is init with the shipment's origin (from), destination (to) and with the shipment's demand.
8769
* The default-value for serviceTime is 0.0. The default-value for a timeWindow is [start=0.0, end=Double.maxValue()].
8870
*
8971
* @param id the id of the shipment
@@ -96,18 +78,6 @@ public static Builder newInstance(Id<CarrierShipment> id, Id<Link> from, Id<Link
9678
return new Builder(id, from, to, demand);
9779
}
9880

99-
/**
100-
* @deprecated Please use Builder (Id<CarrierShipment> id, Id<Link> from, Id<Link> to, int size) instead.
101-
*/
102-
@Deprecated
103-
public Builder(Id<Link> pickupLinkId, Id<Link> deliveryLinkId, int demand) {
104-
super();
105-
this.id = Id.create(CarrierConstants.SHIPMENT +"_" + pickupLinkId.toString() + "_" + deliveryLinkId.toString(), CarrierShipment.class);
106-
this.pickupLinkId = pickupLinkId;
107-
this.deliveryLinkId = deliveryLinkId;
108-
this.demand = demand;
109-
}
110-
11181
private Builder(Id<CarrierShipment> id, Id<Link> pickupLinkId, Id<Link> deliveryLinkId, int demand) {
11282
super();
11383
this.id = id;

0 commit comments

Comments
 (0)