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

org.opentripplanner.graph_builder.Issue Maven / Gradle / Ivy

There is a newer version: 2.6.0
Show newest version
package org.opentripplanner.graph_builder;

/**
 * Generic issue type, which can be used to create issues.
 */
public class Issue implements DataImportIssue {

  private final String type;
  private final String message;
  private final Object[] arguments;

  private Issue(String type, String message, Object... arguments) {
    this.type = type;
    this.message = message;
    this.arguments = arguments;
  }

  public static Issue issue(String type, String message) {
    return new Issue(type, message);
  }

  public static Issue issue(String type, String message, Object... arguments) {
    return new Issue(type, message, arguments);
  }

  @Override
  public String getType() {
    return type;
  }

  @Override
  public String getMessage() {
    return String.format(message, arguments);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy