@Override public int compare(Azs lhs, Azs rhs) { float d1 = lhs.getDistance(); float d2 = rhs.getDistance(); return d1 < d2 ? -1 : d1 == d2 ? 0 : 1; }
private static boolean checkFuels(Azs pAzs, String pFilter) { Map<String, Integer> fuels = pAzs.getFuelAvailable(); String fuelApiName = getFuelTypeForApi(pFilter); return fuels.containsKey(fuelApiName) && fuels.get(fuelApiName) == CONST.FUEL_AVAILABLE; }
private static boolean checkServices(Azs pAzs, String pFilter) { Map<String, Integer> services = pAzs.getServiceAvailable(); return services.containsKey(pFilter) && services.get(pFilter) == CONST.SERVICE_EXIST; }