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

org.opentripplanner.ext.dataoverlay.configuration.DataOverlayParameterBindings Maven / Gradle / Ivy

There is a newer version: 2.6.0
Show newest version
package org.opentripplanner.ext.dataoverlay.configuration;

import java.io.Serializable;
import java.util.List;
import java.util.Optional;
import org.opentripplanner.ext.dataoverlay.api.ParameterName;
import org.opentripplanner.util.lang.ToStringBuilder;

public class DataOverlayParameterBindings implements Serializable {

  private static final long serialVersionUID = 1L;

  private final List parameters;

  DataOverlayParameterBindings(List parameters) {
    this.parameters = parameters;
  }

  public Optional getParameterBinding(ParameterName name) {
    return parameters.stream().filter(it -> it.getName() == name).findFirst();
  }

  @Override
  public String toString() {
    return ToStringBuilder
      .of(DataOverlayParameterBindings.class)
      .addCol("parameters", parameters)
      .toString();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy