Skip to content

Commit

Permalink
Merge pull request #114 from camsys/NYS-125-Arrivals-Departures-API-w…
Browse files Browse the repository at this point in the history
…ill-show-trips-that-are-in-the-past

added ArrivalAndDepartureFilterByPredictedArrivalTime to filter the b…
  • Loading branch information
sheldonabrown authored May 17, 2023
2 parents c9dc040 + 506659b commit 28a3d12
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
1 change: 0 additions & 1 deletion onebusaway-api-webapp/src/main/resources/data-sources.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,4 @@
</map>
</constructor-arg>
</bean>

</beans>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.onebusaway.transit_data.model;

public class ArrivalAndDepartureFilterByPredictedArrivalTime extends ArrivalAndDepartureFilter{

@Override
public boolean matches(ArrivalAndDepartureBean bean) {
if(!( bean.getPredictedArrivalTime() > 0 && bean.getPredictedArrivalTime() < System.currentTimeMillis())){
return true;
}
return false;
}

}

0 comments on commit 28a3d12

Please sign in to comment.