return new AggregationResults<>(commandResult.get("results", new ArrayList<Document>(0)).stream() .map(callback::doWith).collect(Collectors.toList()), commandResult); }); return new AggregationResults<>(iterable.into(new ArrayList<>()), new Document("results", rawResult).append("ok", 1.0D)); });
return new AggregationResults<>(commandResult.get("results", new ArrayList<Document>(0)).stream() .map(callback::doWith).collect(Collectors.toList()), commandResult); }); return new AggregationResults<>(iterable.into(new ArrayList<>()), new Document("results", rawResult).append("ok", 1.0D)); });