
org.onebusaway.gtfs.model.IdentityBean Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of onebusaway-gtfs Show documentation
Show all versions of onebusaway-gtfs Show documentation
A Java library for reading and writing General Transit Feed Spec feeds
package org.onebusaway.gtfs.model;
import java.io.Serializable;
public abstract class IdentityBean implements Serializable {
private static final long serialVersionUID = 1L;
public abstract T getId();
public abstract void setId(T id);
/***************************************************************************
* {@link Object}
**************************************************************************/
@Override
public boolean equals(Object obj) {
if (obj == null || !(obj instanceof IdentityBean>) || getClass() != obj.getClass())
return false;
IdentityBean> entity = (IdentityBean>) obj;
return getId().equals(entity.getId());
}
@Override
public int hashCode() {
return getId().hashCode();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy