1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.qedeq.kernel.se.dto.module; |
17 |
|
|
18 |
|
import org.qedeq.base.utility.EqualsUtility; |
19 |
|
import org.qedeq.kernel.se.base.module.Chapter; |
20 |
|
import org.qedeq.kernel.se.base.module.LatexList; |
21 |
|
import org.qedeq.kernel.se.base.module.SectionList; |
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
@author |
28 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (49) |
Complexity: 19 |
Complexity Density: 0.79 |
|
29 |
|
public class ChapterVo implements Chapter { |
30 |
|
|
31 |
|
|
32 |
|
private LatexList title; |
33 |
|
|
34 |
|
|
35 |
|
private Boolean noNumber; |
36 |
|
|
37 |
|
|
38 |
|
private LatexList introduction; |
39 |
|
|
40 |
|
|
41 |
|
private SectionListVo sectionList; |
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
46 |
196
|
public ChapterVo() {... |
47 |
|
|
48 |
|
} |
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
@param |
54 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
55 |
46
|
public final void setNoNumber(final Boolean noNumber) {... |
56 |
46
|
this.noNumber = noNumber; |
57 |
|
} |
58 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
59 |
729
|
public final Boolean getNoNumber() {... |
60 |
729
|
return noNumber; |
61 |
|
} |
62 |
|
|
63 |
|
|
64 |
|
|
65 |
|
|
66 |
|
@param |
67 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
68 |
47
|
public final void setTitle(final LatexListVo title) {... |
69 |
47
|
this.title = title; |
70 |
|
} |
71 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
72 |
812
|
public final LatexList getTitle() {... |
73 |
812
|
return title; |
74 |
|
} |
75 |
|
|
76 |
|
|
77 |
|
|
78 |
|
|
79 |
|
@param |
80 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
81 |
47
|
public final void setIntroduction(final LatexListVo introduction) {... |
82 |
47
|
this.introduction = introduction; |
83 |
|
} |
84 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
85 |
704
|
public final LatexList getIntroduction() {... |
86 |
704
|
return introduction; |
87 |
|
} |
88 |
|
|
89 |
|
|
90 |
|
|
91 |
|
|
92 |
|
@param |
93 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
94 |
165
|
public final void setSectionList(final SectionListVo sections) {... |
95 |
165
|
this.sectionList = sections; |
96 |
|
} |
97 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
98 |
1055
|
public final SectionList getSectionList() {... |
99 |
1055
|
return sectionList; |
100 |
|
} |
101 |
|
|
102 |
|
|
103 |
|
|
104 |
|
|
105 |
|
@param |
106 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
107 |
7
|
public final void addSection(final SectionVo section) {... |
108 |
7
|
if (sectionList == null) { |
109 |
2
|
sectionList = new SectionListVo(); |
110 |
|
} |
111 |
7
|
sectionList.add(section); |
112 |
|
} |
113 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
114 |
129
|
public boolean equals(final Object obj) {... |
115 |
129
|
if (!(obj instanceof ChapterVo)) { |
116 |
9
|
return false; |
117 |
|
} |
118 |
120
|
final ChapterVo other = (ChapterVo) obj; |
119 |
120
|
return EqualsUtility.equals(getNoNumber(), other.getNoNumber()) |
120 |
|
&& EqualsUtility.equals(getTitle(), other.getTitle()) |
121 |
|
&& EqualsUtility.equals(getIntroduction(), other.getIntroduction()) |
122 |
|
&& EqualsUtility.equals(getSectionList(), other.getSectionList()); |
123 |
|
} |
124 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (9) |
Complexity: 5 |
Complexity Density: 5 |
|
125 |
136
|
public int hashCode() {... |
126 |
136
|
return (getNoNumber() != null ? getNoNumber().hashCode() : 0) |
127 |
136
|
^ (getTitle() != null ? getTitle().hashCode() : 0) |
128 |
136
|
^ (getIntroduction() != null ? 1 ^ getIntroduction().hashCode() : 0) |
129 |
136
|
^ (getSectionList() != null ? 2 ^ getSectionList().hashCode() : 0); |
130 |
|
} |
131 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
132 |
105
|
public String toString() {... |
133 |
105
|
final StringBuffer buffer = new StringBuffer(); |
134 |
105
|
buffer.append("Chapter noNumber: " + getNoNumber() + "\n"); |
135 |
105
|
buffer.append("Chapter Title:\n"); |
136 |
105
|
buffer.append(getTitle() + "\n\n"); |
137 |
105
|
buffer.append("Introduction:\n"); |
138 |
105
|
buffer.append(getIntroduction() + "\n\n"); |
139 |
105
|
buffer.append(getSectionList() + "\n"); |
140 |
105
|
return buffer.toString(); |
141 |
|
} |
142 |
|
|
143 |
|
} |