兼容 Stream (Java8)兼容 Stream (Java8) StreamSupport.stream(db.select("from Table").spliterator(), true) .collect(Collectors.groupingBy((l) -> l.get("GroupID"), Collectors.summingLong((l) -> (Long) l.get("Value"))));