Skip to content

Commit

Permalink
Rename variables
Browse files Browse the repository at this point in the history
  • Loading branch information
optionsome committed Jan 17, 2024
1 parent f290e95 commit f11a81a
Showing 1 changed file with 29 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -334,19 +334,19 @@ The board time is added to the time when going from the stop (offboard) to onboa
);
}

private static void mapBikePreferences(NodeAdapter c, BikePreferences.Builder builder) {
private static void mapBikePreferences(NodeAdapter root, BikePreferences.Builder builder) {
var dft = builder.original();
NodeAdapter cb = c.of("bicycle").since(V2_5).summary("Bicycle preferences.").asObject();
NodeAdapter c = root.of("bicycle").since(V2_5).summary("Bicycle preferences.").asObject();
builder
.withSpeed(
cb
c
.of("speed")
.since(V2_0)
.summary("Max bicycle speed along streets, in meters per second")
.asDouble(dft.speed())
)
.withReluctance(
cb
c
.of("reluctance")
.since(V2_0)
.summary(
Expand All @@ -355,7 +355,7 @@ private static void mapBikePreferences(NodeAdapter c, BikePreferences.Builder bu
.asDouble(dft.reluctance())
)
.withBoardCost(
cb
c
.of("boardCost")
.since(V2_0)
.summary(
Expand All @@ -368,7 +368,7 @@ private static void mapBikePreferences(NodeAdapter c, BikePreferences.Builder bu
.asInt(dft.boardCost())
)
.withOptimizeType(
cb
c
.of("optimization")
.since(V2_0)
.summary("The set of characteristics that the user wants to optimize for.")
Expand All @@ -378,10 +378,10 @@ private static void mapBikePreferences(NodeAdapter c, BikePreferences.Builder bu
.asEnum(dft.optimizeType())
)
// triangle overrides the optimization type if defined
.withForcedOptimizeTriangle(it -> mapOptimizationTriangle(cb, it))
.withWalking(it -> mapVehicleWalking(cb, it))
.withParking(it -> mapParking(cb, it))
.withRental(it -> mapRental(cb, it));
.withForcedOptimizeTriangle(it -> mapOptimizationTriangle(c, it))
.withWalking(it -> mapVehicleWalking(c, it))
.withParking(it -> mapParking(c, it))
.withRental(it -> mapRental(c, it));
}

private static void mapStreetPreferences(NodeAdapter c, StreetPreferences.Builder builder) {
Expand Down Expand Up @@ -570,19 +570,19 @@ The street search(AStar) aborts after this duration and any paths found are retu
);
}

private static void mapCarPreferences(NodeAdapter c, CarPreferences.Builder builder) {
private static void mapCarPreferences(NodeAdapter root, CarPreferences.Builder builder) {
var dft = builder.original();
NodeAdapter cc = c.of("car").since(V2_5).summary("Car preferences.").asObject();
NodeAdapter c = root.of("car").since(V2_5).summary("Car preferences.").asObject();
builder
.withSpeed(
cc
c
.of("speed")
.since(V2_0)
.summary("Max car speed along streets, in meters per second")
.asDouble(dft.speed())
)
.withReluctance(
cc
c
.of("reluctance")
.since(V2_0)
.summary(
Expand All @@ -591,35 +591,35 @@ private static void mapCarPreferences(NodeAdapter c, CarPreferences.Builder buil
.asDouble(dft.reluctance())
)
.withPickupCost(
cc
c
.of("pickupCost")
.since(V2_1)
.summary("Add a cost for car pickup changes when a pickup or drop off takes place")
.asInt(dft.pickupCost().toSeconds())
)
.withPickupTime(
cc
c
.of("pickupTime")
.since(V2_1)
.summary("Add a time for car pickup changes when a pickup or drop off takes place")
.asDuration(dft.pickupTime())
)
.withAccelerationSpeed(
cc
c
.of("accelerationSpeed")
.since(V2_0)
.summary("The acceleration speed of an automobile, in meters per second per second.")
.asDouble(dft.accelerationSpeed())
)
.withDecelerationSpeed(
cc
c
.of("decelerationSpeed")
.since(V2_0)
.summary("The deceleration speed of an automobile, in meters per second per second.")
.asDouble(dft.decelerationSpeed())
)
.withParking(it -> mapParking(cc, it))
.withRental(it -> mapRental(cc, it));
.withParking(it -> mapParking(c, it))
.withRental(it -> mapRental(c, it));
}

private static void mapSystemPreferences(NodeAdapter c, SystemPreferences.Builder builder) {
Expand Down Expand Up @@ -670,19 +670,19 @@ private static void mapSystemPreferences(NodeAdapter c, SystemPreferences.Builde
}
}

private static void mapWalkPreferences(NodeAdapter c, WalkPreferences.Builder walk) {
private static void mapWalkPreferences(NodeAdapter root, WalkPreferences.Builder walk) {
var dft = walk.original();
NodeAdapter cw = c.of("walk").since(V2_5).summary("Walking preferences.").asObject();
NodeAdapter c = root.of("walk").since(V2_5).summary("Walking preferences.").asObject();
walk
.withSpeed(
cw
c
.of("speed")
.since(V2_0)
.summary("The user's walking speed in meters/second.")
.asDouble(dft.speed())
)
.withReluctance(
cw
c
.of("reluctance")
.since(V2_0)
.summary(
Expand All @@ -700,7 +700,7 @@ private static void mapWalkPreferences(NodeAdapter c, WalkPreferences.Builder wa
.asDouble(dft.reluctance())
)
.withBoardCost(
cw
c
.of("boardCost")
.since(V2_0)
.summary(
Expand All @@ -712,14 +712,14 @@ private static void mapWalkPreferences(NodeAdapter c, WalkPreferences.Builder wa
.asInt(dft.boardCost())
)
.withStairsReluctance(
cw
c
.of("stairsReluctance")
.since(V2_0)
.summary("Used instead of walkReluctance for stairs.")
.asDouble(dft.stairsReluctance())
)
.withStairsTimeFactor(
cw
c
.of("stairsTimeFactor")
.since(V2_1)
.summary(
Expand All @@ -734,7 +734,7 @@ private static void mapWalkPreferences(NodeAdapter c, WalkPreferences.Builder wa
.asDouble(dft.stairsTimeFactor())
)
.withSafetyFactor(
cw
c
.of("safetyFactor")
.since(V2_2)
.summary("Factor for how much the walk safety is considered in routing.")
Expand All @@ -744,7 +744,7 @@ private static void mapWalkPreferences(NodeAdapter c, WalkPreferences.Builder wa
.asDouble(dft.safetyFactor())
)
.withEscalatorReluctance(
cw
c
.of("escalatorReluctance")
.since(V2_4)
.summary(
Expand Down

0 comments on commit f11a81a

Please sign in to comment.