class DefaultCollectTerminator<ENTITY> implements CollectTerminator<ENTITY> {

    private DefaultCollectTerminator() {
    }

    @Override
    public <T, R, A> R apply(
        final SqlStreamOptimizerInfo<ENTITY> info,
        final SqlStreamTerminator<ENTITY> sqlStreamTerminator,
        final ReferencePipeline<T> pipeline,
        final Collector<? super T, A, R> collector
    ) {<FILL_FUNCTION_BODY>}

    public static final CollectTerminator<?> DEFAULT = new DefaultCollectTerminator<>();

}

        requireNonNull(info);
        requireNonNull(sqlStreamTerminator);
        requireNonNull(pipeline);
        requireNonNull(collector);

        final ReferencePipeline<T> optimizedPipeline = sqlStreamTerminator.optimize(pipeline);
        return sqlStreamTerminator
            .attachTraceData(optimizedPipeline)
            .getAsReferenceStream().collect(collector);
    
<no_super_class>