Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
Part |
|
| 2.272727272727273;2,273 |
1 | /* | |
2 | =================== DO NOT EDIT THIS FILE ==================== | |
3 | Generated by Modello 1.4.1 on 2012-04-13 21:40:48, | |
4 | any modifications will be overwritten. | |
5 | ============================================================== | |
6 | */ | |
7 | ||
8 | package org.apache.maven.doxia.module.fml.model; | |
9 | ||
10 | /** | |
11 | * | |
12 | * FAQ part. | |
13 | * | |
14 | * | |
15 | * @version $Revision$ $Date$ | |
16 | */ | |
17 | @SuppressWarnings( "all" ) | |
18 | 42 | public class Part |
19 | implements java.io.Serializable | |
20 | { | |
21 | ||
22 | //--------------------------/ | |
23 | //- Class/Member Variables -/ | |
24 | //--------------------------/ | |
25 | ||
26 | /** | |
27 | * | |
28 | * The identifier of the part. | |
29 | * | |
30 | */ | |
31 | private String id; | |
32 | ||
33 | /** | |
34 | * | |
35 | * The title of the FAQ part. | |
36 | * | |
37 | */ | |
38 | private String title; | |
39 | ||
40 | /** | |
41 | * Field faqs. | |
42 | */ | |
43 | private java.util.List<Faq> faqs; | |
44 | ||
45 | ||
46 | //-----------/ | |
47 | //- Methods -/ | |
48 | //-----------/ | |
49 | ||
50 | /** | |
51 | * Method addFaq. | |
52 | * | |
53 | * @param faq | |
54 | */ | |
55 | public void addFaq( Faq faq ) | |
56 | { | |
57 | 168 | getFaqs().add( faq ); |
58 | 168 | } //-- void addFaq( Faq ) |
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 Part ) ) |
74 | { | |
75 | 0 | return false; |
76 | } | |
77 | ||
78 | 0 | Part that = (Part) other; |
79 | 0 | boolean result = true; |
80 | ||
81 | 0 | result = result && ( getId() == null ? that.getId() == null : getId().equals( that.getId() ) ); |
82 | 0 | result = result && ( getTitle() == null ? that.getTitle() == null : getTitle().equals( that.getTitle() ) ); |
83 | 0 | result = result && ( getFaqs() == null ? that.getFaqs() == null : getFaqs().equals( that.getFaqs() ) ); |
84 | ||
85 | 0 | return result; |
86 | } //-- boolean equals( Object ) | |
87 | ||
88 | /** | |
89 | * Method getFaqs. | |
90 | * | |
91 | * @return List | |
92 | */ | |
93 | public java.util.List<Faq> getFaqs() | |
94 | { | |
95 | 252 | if ( this.faqs == null ) |
96 | { | |
97 | 42 | this.faqs = new java.util.ArrayList<Faq>(); |
98 | } | |
99 | ||
100 | 252 | return this.faqs; |
101 | } //-- java.util.List<Faq> getFaqs() | |
102 | ||
103 | /** | |
104 | * Get the identifier of the part. | |
105 | * | |
106 | * @return String | |
107 | */ | |
108 | public String getId() | |
109 | { | |
110 | 84 | return this.id; |
111 | } //-- String getId() | |
112 | ||
113 | /** | |
114 | * Get the title of the FAQ part. | |
115 | * | |
116 | * @return String | |
117 | */ | |
118 | public String getTitle() | |
119 | { | |
120 | 210 | 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 | 0 | result = 37 * result + ( title != null ? title.hashCode() : 0 ); |
134 | 0 | result = 37 * result + ( faqs != null ? faqs.hashCode() : 0 ); |
135 | ||
136 | 0 | return result; |
137 | } //-- int hashCode() | |
138 | ||
139 | /** | |
140 | * Method removeFaq. | |
141 | * | |
142 | * @param faq | |
143 | */ | |
144 | public void removeFaq( Faq faq ) | |
145 | { | |
146 | 0 | getFaqs().remove( faq ); |
147 | 0 | } //-- void removeFaq( Faq ) |
148 | ||
149 | /** | |
150 | * Set a list of FAQ. | |
151 | * | |
152 | * @param faqs | |
153 | */ | |
154 | public void setFaqs( java.util.List<Faq> faqs ) | |
155 | { | |
156 | 0 | this.faqs = faqs; |
157 | 0 | } //-- void setFaqs( java.util.List ) |
158 | ||
159 | /** | |
160 | * Set the identifier of the part. | |
161 | * | |
162 | * @param id | |
163 | */ | |
164 | public void setId( String id ) | |
165 | { | |
166 | 42 | this.id = id; |
167 | 42 | } //-- void setId( String ) |
168 | ||
169 | /** | |
170 | * Set the title of the FAQ part. | |
171 | * | |
172 | * @param title | |
173 | */ | |
174 | public void setTitle( String title ) | |
175 | { | |
176 | 42 | this.title = title; |
177 | 42 | } //-- 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 | 0 | buf.append( "\n" ); |
192 | 0 | buf.append( "title = '" ); |
193 | 0 | buf.append( getTitle() ); |
194 | 0 | buf.append( "'" ); |
195 | 0 | buf.append( "\n" ); |
196 | 0 | buf.append( "faqs = '" ); |
197 | 0 | buf.append( getFaqs() ); |
198 | 0 | buf.append( "'" ); |
199 | ||
200 | 0 | return buf.toString(); |
201 | } //-- java.lang.String toString() | |
202 | ||
203 | } |