All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opentripplanner.client.model.Leg Maven / Gradle / Ivy

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,
    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