docs: @Pure
  	protected ST replaceSegment(int index, ST segment) {
  		ST rep = null;
  		if (this.segmentReplacer != null) {
  			rep = this.segmentReplacer.replaceSegment(index, segment);
  		}
  		if (rep == null) {
  			rep = segment;
  		}
  		return rep;
  	}