class SplitHandler implements SampleVisitor<T> {

    @Override
    public void finish() {
        checkInit();
        for (int i = 0; i < segments; ++i) {
            SegmentBuffer<T> buffer = buffers.get(i);
            T segment = buffer.last();
            int count = buffer.lastCount();
            if (count > 0)
                handle(i, segment, count);
        }
    }

    public  SplitHandler(Splitter<T> splitter);

}