Skip to content

Commit

Permalink
rename a method from add... to set... since that is what is does.
Browse files Browse the repository at this point in the history
  • Loading branch information
kainagel committed Feb 8, 2024
1 parent b0b72a7 commit ec75934
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,17 @@ public Optional<PrebookingParams> getPrebookingParams() {

/**
* Convenience method that brings syntax closer to syntax in, e.g., {@link RoutingConfigGroup} or {@link ScoringConfigGroup}
*
* @deprecated -- use {@link #setDrtInsertionSearchParams(DrtInsertionSearchParams) instead}
*/
@Deprecated
public final void addDrtInsertionSearchParams(final DrtInsertionSearchParams pars) {
addParameterSet(pars);
}
/**
* Convenience method that brings syntax closer to syntax in, e.g., {@link RoutingConfigGroup} or {@link ScoringConfigGroup}
*/
public final void setDrtInsertionSearchParams(final DrtInsertionSearchParams pars) {
addParameterSet(pars);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,19 @@ public class DrtConfigs {
private static final Logger LOGGER = LogManager.getLogger(DrtControlerCreator.class);

public static void adjustMultiModeDrtConfig(MultiModeDrtConfigGroup multiModeDrtCfg,
ScoringConfigGroup planCalcScoreCfg, RoutingConfigGroup plansCalcRouteCfg) {
ScoringConfigGroup planCalcScoreCfg, RoutingConfigGroup plansCalcRouteCfg) {
for (DrtConfigGroup drtCfg : multiModeDrtCfg.getModalElements()) {
DrtConfigs.adjustDrtConfig(drtCfg, planCalcScoreCfg, plansCalcRouteCfg);
}
}

public static void adjustDrtConfig(DrtConfigGroup drtCfg, ScoringConfigGroup planCalcScoreCfg,
RoutingConfigGroup plansCalcRouteCfg) {
RoutingConfigGroup plansCalcRouteCfg) {
String drtStageActivityType = ScoringConfigGroup.createStageActivityType(drtCfg.getMode());
if (planCalcScoreCfg.getActivityParams(drtStageActivityType) == null) {
addDrtStageActivityParams(planCalcScoreCfg, drtStageActivityType);
}
// yyyy I think that the above functionality could/should be moved into the config consistency checker. kai, feb'24
}

private static void addDrtStageActivityParams(ScoringConfigGroup planCalcScoreCfg, String stageActivityType) {
Expand Down

0 comments on commit ec75934

Please sign in to comment.