class MinimumScoreCollector<T extends Collector> extends SimpleCollector {

    private final T collector;
    private final float minimumScore;

    private Scorable scorer;
    private LeafCollector leafCollector;

    public MinimumScoreCollector(T collector, float minimumScore) {
        this.collector = collector;
        this.minimumScore = minimumScore;
    }

    public T delegate() {
        return collector;
    }

    @Override
    public void setScorer(Scorable scorer) throws IOException {<FILL_FUNCTION_BODY>}

    @Override
    public void collect(int doc) throws IOException {
        if (scorer.score() >= minimumScore) {
            leafCollector.collect(doc);
        }
    }

    @Override
    public void doSetNextReader(LeafReaderContext context) throws IOException {
        leafCollector = collector.getLeafCollector(context);
    }

    @Override
    public ScoreMode scoreMode() {
        return ScoreMode.COMPLETE;
    }

}

        if (!(scorer instanceof ScoreCachingWrappingScorer)) {
            scorer = ScoreCachingWrappingScorer.wrap(scorer);
        }
        this.scorer = scorer;
        leafCollector.setScorer(scorer);
    
<no_super_class>