From 060dde94b39a58dd20f6c0f3200229bc54cebc9d Mon Sep 17 00:00:00 2001 From: Kai Martins-Turner Date: Fri, 20 Dec 2024 15:19:33 +0100 Subject: [PATCH] remove long-time deprecated constructor / newInstance(...)-method in CarrierShipment.Builder --- .../freight/carriers/CarrierShipment.java | 34 ++----------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/contribs/freight/src/main/java/org/matsim/freight/carriers/CarrierShipment.java b/contribs/freight/src/main/java/org/matsim/freight/carriers/CarrierShipment.java index 748b9f0a412..a74177246d5 100644 --- a/contribs/freight/src/main/java/org/matsim/freight/carriers/CarrierShipment.java +++ b/contribs/freight/src/main/java/org/matsim/freight/carriers/CarrierShipment.java @@ -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 id, Id from, Id to, int size) instead. - *

* Returns a new shipment builder. - *

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 from, Id 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. - *

The builder is init with the shipment's origin (from), destination (to) and with the shipment's demand. + *

+ * 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 @@ -96,18 +78,6 @@ public static Builder newInstance(Id id, Id from, Id id, Id from, Id to, int size) instead. - */ - @Deprecated - public Builder(Id pickupLinkId, Id 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 id, Id pickupLinkId, Id deliveryLinkId, int demand) { super(); this.id = id;