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

org.opentripplanner.client.parameters.InputBanned Maven / Gradle / Ivy

There is a newer version: 0.1.7
Show newest version
package org.opentripplanner.client.parameters;

import java.util.Set;

public class InputBanned {

  public InputBanned(
      Set routes,
      Set agencies,
      Set trips,
      Set stops,
      Set stopsHard) {
    this.routes = routes;
    this.agencies = agencies;
    this.trips = trips;
    this.stops = stops;
    this.stopsHard = stopsHard;
  }

  Set routes = Set.of();

  Set agencies = Set.of();

  Set trips = Set.of();

  Set stops = Set.of();

  Set stopsHard = Set.of();

  public static InputBannedBuilder builder() {
    return new InputBannedBuilder();
  }

  @Override
  public String toString() {
    String routesString =
        routes.isEmpty() ? "" : String.format("routes: \"%s\"", String.join(",", routes));
    String agenciesString =
        agencies.isEmpty() ? "" : String.format("agencies: \"%s\"", String.join(",", agencies));
    String tripsString =
        trips.isEmpty() ? "" : String.format("trips: \"%s\"", String.join(",", trips));
    String stopsString =
        stops.isEmpty() ? "" : String.format("stops: \"%s\"", String.join(",", stops));
    String stopsHardString =
        stopsHard.isEmpty() ? "" : String.format("stopsHard: \"%s\"", String.join(",", stopsHard));

    return String.format(
        "{%s %s %s %s %s}",
        routesString, agenciesString, tripsString, stopsString, stopsHardString);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy