diff --git a/onebusaway-gtfs/src/main/java/org/onebusaway/gtfs/impl/StopTimeArray.java b/onebusaway-gtfs/src/main/java/org/onebusaway/gtfs/impl/StopTimeArray.java index 28b30445..c03a8e1c 100644 --- a/onebusaway-gtfs/src/main/java/org/onebusaway/gtfs/impl/StopTimeArray.java +++ b/onebusaway-gtfs/src/main/java/org/onebusaway/gtfs/impl/StopTimeArray.java @@ -258,6 +258,11 @@ public StopLocation getStop() { return stops[index]; } + @Override + public StopLocation getLocation() { + return stops[index]; + } + @Override public void setStop(StopLocation stop) { stops[index] = stop; diff --git a/onebusaway-gtfs/src/main/java/org/onebusaway/gtfs/model/StopTime.java b/onebusaway-gtfs/src/main/java/org/onebusaway/gtfs/model/StopTime.java index bb122bf1..4db4c785 100644 --- a/onebusaway-gtfs/src/main/java/org/onebusaway/gtfs/model/StopTime.java +++ b/onebusaway-gtfs/src/main/java/org/onebusaway/gtfs/model/StopTime.java @@ -282,6 +282,13 @@ public StopLocation getStop() { return Objects.requireNonNullElse(stop, location); } + public StopLocation getLocation() { + if (proxy != null) { + return proxy.getLocation(); + } + return location; + } + public void setStop(StopLocation stop) { if (proxy != null) { proxy.setStop(stop); diff --git a/onebusaway-gtfs/src/main/java/org/onebusaway/gtfs/model/StopTimeProxy.java b/onebusaway-gtfs/src/main/java/org/onebusaway/gtfs/model/StopTimeProxy.java index 728dc0a0..1cbc75af 100644 --- a/onebusaway-gtfs/src/main/java/org/onebusaway/gtfs/model/StopTimeProxy.java +++ b/onebusaway-gtfs/src/main/java/org/onebusaway/gtfs/model/StopTimeProxy.java @@ -45,6 +45,8 @@ public interface StopTimeProxy { public StopLocation getStop(); + public StopLocation getLocation(); + public void setStop(StopLocation stop); public void setLocation(StopLocation stop); @@ -124,4 +126,5 @@ public interface StopTimeProxy { public String getFreeRunningFlag(); public void setFreeRunningFlag(String freeRunningFlag); + }