Search in sources :

Example 1 with RevenueServiceFilter

use of org.onebusaway.admin.search.impl.RevenueServiceFilter in project onebusaway-application-modules by camsys.

the class VehicleSearchServiceImpl method searchVehiclesInRevenueService.

@Override
public List<VehicleStatus> searchVehiclesInRevenueService(List<VehicleStatus> vehicleStatusRecords) {
    Filter<VehicleStatus> revenueServiceFilter = new RevenueServiceFilter();
    List<VehicleStatus> vehiclesInRevenueService = new ArrayList<VehicleStatus>();
    for (VehicleStatus vehicleStatus : vehicleStatusRecords) {
        if (revenueServiceFilter.apply(vehicleStatus)) {
            vehiclesInRevenueService.add(vehicleStatus);
        }
    }
    return vehiclesInRevenueService;
}
Also used : RevenueServiceFilter(org.onebusaway.admin.search.impl.RevenueServiceFilter) ArrayList(java.util.ArrayList) VehicleStatus(org.onebusaway.admin.model.ui.VehicleStatus)

Aggregations

ArrayList (java.util.ArrayList)1 VehicleStatus (org.onebusaway.admin.model.ui.VehicleStatus)1 RevenueServiceFilter (org.onebusaway.admin.search.impl.RevenueServiceFilter)1