Skip to content
This repository has been archived by the owner on Nov 29, 2024. It is now read-only.

Commit

Permalink
remove unused var from method signature
Browse files Browse the repository at this point in the history
  • Loading branch information
kt86 committed Aug 14, 2024
1 parent 9b2e27c commit 1f901f0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ protected void updateShipments() {
&& pair.carrierService.getId() == carrierPair.carrierService.getId()) {
addShipmentLoadElement(lspShipment, tour, serviceActivity);
addShipmentTransportElement(lspShipment, tour, serviceActivity);
addShipmentUnloadElement(lspShipment, tour, serviceActivity);
addShipmentUnloadElement(lspShipment, tour);
addCollectionTourEndEventHandler(pair.carrierService, lspShipment, resource, tour);
addCollectionServiceEventHandler(pair.carrierService, lspShipment, resource);
}
Expand Down Expand Up @@ -211,8 +211,7 @@ private void addCollectionTourEndEventHandler(
}
}

private void addShipmentUnloadElement(
LspShipment lspShipment, Tour tour, Tour.ServiceActivity serviceActivity) {
private void addShipmentUnloadElement(LspShipment lspShipment, Tour tour) {

LspShipmentUtils.ScheduledShipmentUnloadBuilder builder =
LspShipmentUtils.ScheduledShipmentUnloadBuilder.newInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ protected void updateShipments() {
for (LSPCarrierPair pair : pairs) {
if (pair.lspShipment == carrierPair.lspShipment
&& pair.carrierService.getId() == carrierPair.carrierService.getId()) {
addShipmentLoadElement(lspShipment, tour, serviceActivity);
addShipmentLoadElement(lspShipment, tour);
addShipmentTransportElement(lspShipment, tour, serviceActivity);
addShipmentUnloadElement(lspShipment, tour, serviceActivity);
addDistributionTourStartEventHandler(pair.carrierService, lspShipment, resource, tour);
Expand All @@ -206,9 +206,7 @@ protected void updateShipments() {
}
}

private void addShipmentLoadElement(
LspShipment lspShipment, Tour tour, Tour.ServiceActivity serviceActivity) {

private void addShipmentLoadElement(LspShipment lspShipment, Tour tour) {
LspShipmentUtils.ScheduledShipmentLoadBuilder builder =
LspShipmentUtils.ScheduledShipmentLoadBuilder.newInstance();
builder.setResourceId(resource.getId());
Expand All @@ -219,8 +217,7 @@ private void addShipmentLoadElement(
}
}

int startIndex =
tour.getTourElements().indexOf(tour.getTourElements().indexOf(tour.getStart()));
int startIndex = tour.getTourElements().indexOf(tour.getTourElements().indexOf(tour.getStart()));
Leg legAfterStart = (Leg) tour.getTourElements().get(startIndex + 1);
double startTimeOfTransport = legAfterStart.getExpectedDepartureTime();
double cumulatedLoadingTime = 0;
Expand Down Expand Up @@ -253,8 +250,7 @@ private void addShipmentTransportElement(
}
}

int startIndex =
tour.getTourElements().indexOf(tour.getTourElements().indexOf(tour.getStart()));
int startIndex = tour.getTourElements().indexOf(tour.getTourElements().indexOf(tour.getStart()));
final Leg legAfterStart = (Leg) tour.getTourElements().get(startIndex + 1);
final int serviceIndex = tour.getTourElements().indexOf(serviceActivity);
final Leg legBeforeService = (Leg) tour.getTourElements().get(serviceIndex - 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ protected void updateShipments() {
&& pair.carrierService.getId() == carrierPair.carrierService.getId()) {
addShipmentLoadElement(LspShipment, tour);
addShipmentTransportElement(LspShipment, tour, serviceActivity);
addShipmentUnloadElement(LspShipment, tour, serviceActivity);
addShipmentUnloadElement(LspShipment, tour);
addMainTourRunStartEventHandler(pair.carrierService, LspShipment, resource, tour);
addMainRunTourEndEventHandler(pair.carrierService, LspShipment, resource, tour);
}
Expand All @@ -268,8 +268,7 @@ private void addShipmentLoadElement(LspShipment lspShipment, Tour tour) {
builder.setLogisticChainElement(element);
}
}
int startIndex =
tour.getTourElements().indexOf(tour.getTourElements().indexOf(tour.getStart()));
int startIndex = tour.getTourElements().indexOf(tour.getTourElements().indexOf(tour.getStart()));
Leg legAfterStart = (Leg) tour.getTourElements().get(startIndex + 1);
double startTimeOfTransport = legAfterStart.getExpectedDepartureTime();
double cumulatedLoadingTime = 0;
Expand Down Expand Up @@ -300,8 +299,7 @@ private void addShipmentTransportElement(LspShipment lspShipment, Tour tour, Tou
builder.setLogisticChainElement(element);
}
}
int startIndex =
tour.getTourElements().indexOf(tour.getTourElements().indexOf(tour.getStart()));
int startIndex = tour.getTourElements().indexOf(tour.getTourElements().indexOf(tour.getStart()));
Leg legAfterStart = (Leg) tour.getTourElements().get(startIndex + 1);
double startTimeOfTransport = legAfterStart.getExpectedDepartureTime();
builder.setStartTime(startTimeOfTransport);
Expand All @@ -320,7 +318,7 @@ private void addShipmentTransportElement(LspShipment lspShipment, Tour tour, Tou
.addPlanElement(id, transport);
}

private void addShipmentUnloadElement(LspShipment lspShipment, Tour tour, Tour.ServiceActivity serviceActivity) {
private void addShipmentUnloadElement(LspShipment lspShipment, Tour tour) {
LspShipmentUtils.ScheduledShipmentUnloadBuilder builder =
LspShipmentUtils.ScheduledShipmentUnloadBuilder.newInstance();
builder.setResourceId(resource.getId());
Expand All @@ -335,8 +333,7 @@ private void addShipmentUnloadElement(LspShipment lspShipment, Tour tour, Tour.S
cumulatedLoadingTime = cumulatedLoadingTime + activity.getDuration();
}
}
int startIndex =
tour.getTourElements().indexOf(tour.getTourElements().indexOf(tour.getStart()));
int startIndex = tour.getTourElements().indexOf(tour.getTourElements().indexOf(tour.getStart()));
Leg legAfterStart = (Leg) tour.getTourElements().get(startIndex + 1);
builder.setStartTime(
legAfterStart.getExpectedDepartureTime() + legAfterStart.getExpectedTransportTime());
Expand Down

0 comments on commit 1f901f0

Please sign in to comment.