Skip to content

Commit

Permalink
remove long-time deprecated constructor / newInstance(...)-method in …
Browse files Browse the repository at this point in the history
…CarrierShipment.Builder
  • Loading branch information
kt86 committed Dec 20, 2024
1 parent 1691f8a commit 060dde9
Showing 1 changed file with 2 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,28 +62,10 @@ public static class Builder {
private TimeWindow deliveryStartsTimeWindow = TimeWindow.newInstance(0.0, Integer.MAX_VALUE);
private double deliveryDuration = 0.0;


/**
* @deprecated Please use Builder newInstance(Id<CarrierShipment> id, Id<Link> from, Id<Link> to, int size) instead.
* <p>
* Returns a new shipment builder.
* <p> The builder is init with the shipment's origin (from), destination (to) and with the shipment's size.
* The default-value for serviceTime is 0.0. The default-value for a timeWindow is [start=0.0, end=Double.maxValue()].
*
* @param from the origin
* @param to the destination
* @param size size of the shipment
* @return the builder
*/
@Deprecated
public static Builder newInstance(Id<Link> from, Id<Link> to, int size){
var id = Id.create(CarrierConstants.SHIPMENT +"_" + from.toString() + "_" + to.toString(), CarrierShipment.class);
return new Builder(id, from,to,size);
}

/**
* Returns a new shipment builder.
* <p> The builder is init with the shipment's origin (from), destination (to) and with the shipment's demand.
* <p>
* The builder is init with the shipment's origin (from), destination (to) and with the shipment's demand.
* The default-value for serviceTime is 0.0. The default-value for a timeWindow is [start=0.0, end=Double.maxValue()].
*
* @param id the id of the shipment
Expand All @@ -96,18 +78,6 @@ public static Builder newInstance(Id<CarrierShipment> id, Id<Link> from, Id<Link
return new Builder(id, from, to, demand);
}

/**
* @deprecated Please use Builder (Id<CarrierShipment> id, Id<Link> from, Id<Link> to, int size) instead.
*/
@Deprecated
public Builder(Id<Link> pickupLinkId, Id<Link> deliveryLinkId, int demand) {
super();
this.id = Id.create(CarrierConstants.SHIPMENT +"_" + pickupLinkId.toString() + "_" + deliveryLinkId.toString(), CarrierShipment.class);
this.pickupLinkId = pickupLinkId;
this.deliveryLinkId = deliveryLinkId;
this.demand = demand;
}

private Builder(Id<CarrierShipment> id, Id<Link> pickupLinkId, Id<Link> deliveryLinkId, int demand) {
super();
this.id = id;
Expand Down

0 comments on commit 060dde9

Please sign in to comment.