Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
Chapter |
|
| 1.7272727272727273;1,727 |
1 | /* | |
2 | =================== DO NOT EDIT THIS FILE ==================== | |
3 | Generated by Modello 1.4.1 on 2011-04-29 23:18:09, | |
4 | any modifications will be overwritten. | |
5 | ============================================================== | |
6 | */ | |
7 | ||
8 | package org.apache.maven.doxia.book.model; | |
9 | ||
10 | /** | |
11 | * Class Chapter. | |
12 | * | |
13 | * @version $Revision$ $Date$ | |
14 | */ | |
15 | @SuppressWarnings( "all" ) | |
16 | 8 | public class Chapter |
17 | implements java.io.Serializable | |
18 | { | |
19 | ||
20 | //--------------------------/ | |
21 | //- Class/Member Variables -/ | |
22 | //--------------------------/ | |
23 | ||
24 | /** | |
25 | * | |
26 | * Specifies the id of this chapter. This is a | |
27 | * symbolic name for a | |
28 | * particular chapter. | |
29 | * | |
30 | */ | |
31 | private String id; | |
32 | ||
33 | /** | |
34 | * | |
35 | * Specifies the title of this chapter. | |
36 | * | |
37 | */ | |
38 | private String title; | |
39 | ||
40 | /** | |
41 | * Field sections. | |
42 | */ | |
43 | private java.util.List<Section> sections; | |
44 | ||
45 | ||
46 | //-----------/ | |
47 | //- Methods -/ | |
48 | //-----------/ | |
49 | ||
50 | /** | |
51 | * Method addSection. | |
52 | * | |
53 | * @param section | |
54 | */ | |
55 | public void addSection( Section section ) | |
56 | { | |
57 | 0 | getSections().add( section ); |
58 | 0 | } //-- void addSection( Section ) |
59 | ||
60 | /** | |
61 | * Method equals. | |
62 | * | |
63 | * @param other | |
64 | * @return boolean | |
65 | */ | |
66 | public boolean equals( Object other ) | |
67 | { | |
68 | 0 | if ( this == other ) |
69 | { | |
70 | 0 | return true; |
71 | } | |
72 | ||
73 | 0 | if ( !( other instanceof Chapter ) ) |
74 | { | |
75 | 0 | return false; |
76 | } | |
77 | ||
78 | 0 | Chapter that = (Chapter) other; |
79 | 0 | boolean result = true; |
80 | ||
81 | 0 | result = result && ( getId() == null ? that.getId() == null : getId().equals( that.getId() ) ); |
82 | ||
83 | 0 | return result; |
84 | } //-- boolean equals( Object ) | |
85 | ||
86 | /** | |
87 | * Get specifies the id of this chapter. This is a symbolic | |
88 | * name for a | |
89 | * particular chapter. | |
90 | * | |
91 | * @return String | |
92 | */ | |
93 | public String getId() | |
94 | { | |
95 | 56 | return this.id; |
96 | } //-- String getId() | |
97 | ||
98 | /** | |
99 | * Method getSections. | |
100 | * | |
101 | * @return List | |
102 | */ | |
103 | public java.util.List<Section> getSections() | |
104 | { | |
105 | 80 | if ( this.sections == null ) |
106 | { | |
107 | 0 | this.sections = new java.util.ArrayList<Section>(); |
108 | } | |
109 | ||
110 | 80 | return this.sections; |
111 | } //-- java.util.List<Section> getSections() | |
112 | ||
113 | /** | |
114 | * Get specifies the title of this chapter. | |
115 | * | |
116 | * @return String | |
117 | */ | |
118 | public String getTitle() | |
119 | { | |
120 | 84 | return this.title; |
121 | } //-- String getTitle() | |
122 | ||
123 | /** | |
124 | * Method hashCode. | |
125 | * | |
126 | * @return int | |
127 | */ | |
128 | public int hashCode() | |
129 | { | |
130 | 0 | int result = 17; |
131 | ||
132 | 0 | result = 37 * result + ( id != null ? id.hashCode() : 0 ); |
133 | ||
134 | 0 | return result; |
135 | } //-- int hashCode() | |
136 | ||
137 | /** | |
138 | * Method removeSection. | |
139 | * | |
140 | * @param section | |
141 | */ | |
142 | public void removeSection( Section section ) | |
143 | { | |
144 | 0 | getSections().remove( section ); |
145 | 0 | } //-- void removeSection( Section ) |
146 | ||
147 | /** | |
148 | * Set specifies the id of this chapter. This is a symbolic | |
149 | * name for a | |
150 | * particular chapter. | |
151 | * | |
152 | * @param id | |
153 | */ | |
154 | public void setId( String id ) | |
155 | { | |
156 | 8 | this.id = id; |
157 | 8 | } //-- void setId( String ) |
158 | ||
159 | /** | |
160 | * Set specifies a collection of sections. | |
161 | * | |
162 | * @param sections | |
163 | */ | |
164 | public void setSections( java.util.List<Section> sections ) | |
165 | { | |
166 | 8 | this.sections = sections; |
167 | 8 | } //-- void setSections( java.util.List ) |
168 | ||
169 | /** | |
170 | * Set specifies the title of this chapter. | |
171 | * | |
172 | * @param title | |
173 | */ | |
174 | public void setTitle( String title ) | |
175 | { | |
176 | 8 | this.title = title; |
177 | 8 | } //-- void setTitle( String ) |
178 | ||
179 | /** | |
180 | * Method toString. | |
181 | * | |
182 | * @return String | |
183 | */ | |
184 | public java.lang.String toString() | |
185 | { | |
186 | 0 | StringBuilder buf = new StringBuilder( 128 ); |
187 | ||
188 | 0 | buf.append( "id = '" ); |
189 | 0 | buf.append( getId() ); |
190 | 0 | buf.append( "'" ); |
191 | ||
192 | 0 | return buf.toString(); |
193 | } //-- java.lang.String toString() | |
194 | ||
195 | } |