Fix transport stop compare

This commit is contained in:
Victor Shcherb 2019-07-29 10:08:35 +02:00
parent 221dc057e7
commit 0ce5b2f212

View file

@ -60,6 +60,15 @@ public class TransportStop extends MapObject {
public void setDeletedRoutesIds(long[] deletedRoutesIds) { public void setDeletedRoutesIds(long[] deletedRoutesIds) {
this.deletedRoutesIds = deletedRoutesIds; this.deletedRoutesIds = deletedRoutesIds;
} }
public void addRouteId(long routeId) {
routesIds = Algorithms.addToArrayL(routesIds, routeId, true);
}
public void addDeletedRouteId(long routeId) {
deletedRoutesIds = Algorithms.addToArrayL(deletedRoutesIds, routeId, true);
}
public boolean isRouteDeleted(long routeId) { public boolean isRouteDeleted(long routeId) {
return deletedRoutesIds != null && Arrays.binarySearch(deletedRoutesIds, routeId) >= 0; return deletedRoutesIds != null && Arrays.binarySearch(deletedRoutesIds, routeId) >= 0;