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

org.opentripplanner.model.StreetNote Maven / Gradle / Ivy

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

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;
import org.opentripplanner.transit.model.basic.I18NString;
import org.opentripplanner.transit.model.basic.NonLocalizedString;

public class StreetNote implements Serializable {

  public final I18NString note;
  public I18NString descriptionText;
  public Date effectiveStartDate;
  public Date effectiveEndDate;
  public String url;

  public StreetNote(I18NString note) {
    this.note = note;
  }

  public StreetNote(String note) {
    this.note = new NonLocalizedString(note);
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    StreetNote that = (StreetNote) o;
    return (
      Objects.equals(note, that.note) &&
      Objects.equals(descriptionText, that.descriptionText) &&
      Objects.equals(effectiveStartDate, that.effectiveStartDate) &&
      Objects.equals(effectiveEndDate, that.effectiveEndDate) &&
      Objects.equals(url, that.url)
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(note, descriptionText, effectiveStartDate, effectiveEndDate, url);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy