
org.opentripplanner.client.model.Leg Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of otp-client Show documentation
Show all versions of otp-client Show documentation
Java client for the OpenTripPlanner GraphQL API
package org.opentripplanner.client.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.Duration;
import java.time.OffsetDateTime;
import java.util.List;
import java.util.Optional;
import java.util.OptionalDouble;
public record Leg(
Place from,
Place to,
OffsetDateTime startTime,
OffsetDateTime endTime,
Boolean realTime,
LegMode mode,
Duration duration,
double distance,
Optional headsign,
Route route,
Trip trip,
List fareProducts,
OptionalDouble accessibilityScore,
Agency agency,
@JsonProperty("legGeometry") LegGeometry geometry,
@JsonProperty("rentedBike") boolean rentedVehicle,
Optional> intermediatePlaces) {
/** Is this leg using public transport? */
public boolean isTransit() {
return mode.isTransit();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy