@SuppressWarnings("unchecked")
    public void add(final T e) {
        Segment<T> lastSeg = getLast();
        if (lastSeg == null || lastSeg.isReachEnd()) {
            lastSeg = (Segment<T>) Segment.newInstance(this.recycleSegment);
            this.segments.add(lastSeg);
        }
        lastSeg.add(e);
        this.size++;
        this.estimatedBytes += e.estimatedSize();
    }
A recyclable segment.
@author boyan(boyan@antfin.com)

@param <T>
jraft-core/src/main/java/com/alipay/sofa/jraft/util/SegmentList.java