Exemple #1
0
 public SectionBag getSection(String id) {
   for (SectionBag section : sections) {
     if (section.getId().equals(id)) {
       return section;
     }
   }
   return null;
 }
Exemple #2
0
  public SectionBag getSectionBag(Section currentSection) {
    SectionBag section = this.getSection(currentSection.id());

    if (section != null) {
      return section;
    } else {
      section = new SectionBag();
      section.setChapter(this);
      section.setId(currentSection.id());
      section.setActions(new ArrayList<ActionBag>());
      sections.add(section);
      return section;
    }
  }