public TextRange getSegmentRange(int segment) {
    return new TextRange(getSegments().getSegmentStart(segment), getSegments().getSegmentEnd(segment));
  }
public TextRange getSegmentRange(int segment)