/** * Creates a new {@link AggregationResults} instance from the given mapped and raw results. * * @param mappedResults must not be {@literal null}. * @param rawResults must not be {@literal null}. */ public AggregationResults(List<T> mappedResults, Document rawResults) { Assert.notNull(mappedResults, "List of mapped results must not be null!"); Assert.notNull(rawResults, "Raw results must not be null!"); this.mappedResults = Collections.unmodifiableList(mappedResults); this.rawResults = rawResults; this.serverUsed = parseServerUsed(); }
/** * Creates a new {@link AggregationResults} instance from the given mapped and raw results. * * @param mappedResults must not be {@literal null}. * @param rawResults must not be {@literal null}. */ public AggregationResults(List<T> mappedResults, Document rawResults) { Assert.notNull(mappedResults, "List of mapped results must not be null!"); Assert.notNull(rawResults, "Raw results must not be null!"); this.mappedResults = Collections.unmodifiableList(mappedResults); this.rawResults = rawResults; this.serverUsed = parseServerUsed(); }