public static <T, T_RESULT_PAGE extends ResultPage<T>> T_RESULT_PAGE createUnboundedList(
            final List<T> realList,
            final BiFunction<List<T>, PageResponse, T_RESULT_PAGE> function) {

        if (realList != null) {
            return function.apply(realList, createPageResponse(realList));
        } else {
            return function.apply(Collections.emptyList(), createPageResponse(Collections.emptyList()));
        }
    }
Used for full queries (not bounded).
stroom-util/src/main/java/stroom/util/ResultPageFactory.java