Skip to content

Commit

Permalink
Reformat code
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardehrenfried committed Oct 6, 2023
1 parent 3ce18cc commit 4220c72
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
public record FareProductUse(String id, FareProduct product) {

public record FareProduct(
String id,
String name,
Money price,
@Nullable FareProduct.RiderCategory riderCategory,
@Nullable FareProduct.FareMedium medium) {
String id,
String name,
Money price,
@Nullable FareProduct.RiderCategory riderCategory,
@Nullable FareProduct.FareMedium medium) {

public record RiderCategory(String id, String name) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

public record Itinerary(List<Leg> legs) {

/**
* Does this itinerary contain any legs that contain public transport?
*/
/** Does this itinerary contain any legs that contain public transport? */
public boolean hasTransit() {
return legs.stream().anyMatch(Leg::isTransit);
}
Expand Down
22 changes: 10 additions & 12 deletions src/main/java/org/opentripplanner/client/model/Leg.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,17 @@
import org.opentripplanner.client.model.TripPlan.Place;

public record Leg(
Place from,
Place to,
OffsetDateTime startTime,
OffsetDateTime endTime,
LegMode mode,
Duration duration,
double distance,
Route route,
List<FareProductUse> fareProducts) {
Place from,
Place to,
OffsetDateTime startTime,
OffsetDateTime endTime,
LegMode mode,
Duration duration,
double distance,
Route route,
List<FareProductUse> fareProducts) {

/**
* Is this leg using public transport?
*/
/** Is this leg using public transport? */
public boolean isTransit() {
return mode.isTransit();
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/opentripplanner/IntegrationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import org.junit.jupiter.api.Test;
import org.opentripplanner.client.OtpApiClient;
import org.opentripplanner.client.model.Coordinate;
import org.opentripplanner.client.model.RequestMode;
import org.opentripplanner.client.model.FareProductUse;
import org.opentripplanner.client.model.RequestMode;
import org.opentripplanner.client.parameters.TripPlanParameters;
import org.opentripplanner.client.parameters.TripPlanParameters.SearchDirection;
import org.slf4j.Logger;
Expand Down

0 comments on commit 4220c72

Please sign in to comment.