public static <T, R extends ResultPage<T>> Collector<T, List<T>, R> collector(
            final BiFunction<List<T>, PageResponse, R> resultPageFactory) {

        return createCollector(null, resultPageFactory);
    }
Creates a collector that builds a sub class of a ResultPage, e.g.
.collect(ListConfigResponse.collector(ListConfigResponse::new));
stroom-util-shared/src/main/java/stroom/util/shared/ResultPage.java