Triple的使用
public Triple<Long, Long, Double> getCarRunSummary(String did, Date startDate, Date endDate) { Map<String, Object> map = kuduRepository.getCarRunSummary(did, startDate, endDate); if (map != null) { Long mileage = map.get("total_mileage") != null ? ((Number) map.get("total_mileage")).longValue() : null; Long runTime = map.get("total_run_time") != null ? ((Number) map.get("total_run_time")).longValue() : null; Double fuelConsumption = map.get("total_fuel_consumption") != null ? ((Number) map.get("total_fuel_consumption")).doubleValue() : null; return Triple.of(mileage, runTime, fuelConsumption); } return null; }