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

org.opentripplanner.client.model.Route 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.util.Optional;

public record Route(
    @JsonProperty("gtfsId") String id,
    Optional shortName,
    Optional longName,
    @JsonProperty("type") int modeCode,
    TransitMode mode,
    Agency agency) {

  /**
   * Either the short name (if it has one) or the long name.
   *
   * 

Either is optional but one must exist. */ public String name() { return shortName.or(() -> longName).orElseThrow(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy