code: public void setSections(List<PageSection> sections) {
          this.sections.clear();
          if (sections != null) {
              this.sections.addAll(sections);
          }
      }
docs: Clears the current root sections and copies new sections from given list
  @param sections