Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Freight (Carrier): Remove long-time deprecated Builder #3646

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading