code: public Segment getSegment(int index) {
  
      if (this.segments == null) {
        throw new IndexOutOfBoundsException(Integer.toString(index));
      }
      return this.segments.get(index);
    }
docs: This method gets the contained child {@link Segment} with the given {@code index}.
  
  @see java.util.List#get(int)
  
  @param index is the index of the requested child {@link Segment}. See {@link #getSegmentCount()}.
  @return the requested child {@link Segment}.