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

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

There is a newer version: 0.1.7
Show newest version
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