Rev 1860 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1848 | jmachado | 1 | package pt.estgp.estgweb.utils.documentBuilder; |
2 | |||
3 | import java.util.ArrayList; |
||
4 | |||
5 | /** |
||
6 | * Created by jorgemachado on 07/11/17. |
||
7 | */ |
||
8 | public class SectionContainer extends ExtensibleDocObject |
||
9 | { |
||
1918 | grupo4 | 10 | ArrayList<DocumentSection> sections = new ArrayList<DocumentSection>(); |
1848 | jmachado | 11 | |
1918 | grupo4 | 12 | public ArrayList<DocumentSection> getSections() { |
1848 | jmachado | 13 | return sections; |
14 | } |
||
15 | |||
1918 | grupo4 | 16 | public void setSections(ArrayList<DocumentSection> sections) { |
1848 | jmachado | 17 | this.sections = sections; |
18 | } |
||
19 | |||
20 | public DocumentSection findSection(1.5.0/docs/api/java/lang/Class.html">Class sectionClass) |
||
21 | { |
||
22 | if(getSections() != null) |
||
23 | for(DocumentSection section: getSections()) |
||
24 | { |
||
25 | if(section.getClass().equals(sectionClass)) |
||
26 | { |
||
27 | return section; |
||
28 | } |
||
29 | } |
||
30 | return null; |
||
31 | } |
||
32 | |||
33 | |||
34 | |||
35 | } |