1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 package org.apache.maven.plugins.javadoc.options;
25
26
27
28
29
30
31 @SuppressWarnings( "all" )
32 public class Tag
33 implements java.io.Serializable
34 {
35
36
37
38
39
40
41
42
43 private String name;
44
45
46
47
48 private String head;
49
50
51
52
53 private String placement;
54
55
56
57
58
59
60
61
62
63
64
65
66 public boolean equals( Object other )
67 {
68 if ( this == other )
69 {
70 return true;
71 }
72
73 if ( !( other instanceof Tag ) )
74 {
75 return false;
76 }
77
78 Tag that = (Tag) other;
79 boolean result = true;
80
81 result = result && ( getName() == null ? that.getName() == null : getName().equals( that.getName() ) );
82 result = result && ( getHead() == null ? that.getHead() == null : getHead().equals( that.getHead() ) );
83 result = result && ( getPlacement() == null ? that.getPlacement() == null : getPlacement().equals( that.getPlacement() ) );
84
85 return result;
86 }
87
88
89
90
91
92
93 public String getHead()
94 {
95 return this.head;
96 }
97
98
99
100
101
102
103 public String getName()
104 {
105 return this.name;
106 }
107
108
109
110
111
112
113 public String getPlacement()
114 {
115 return this.placement;
116 }
117
118
119
120
121
122
123 public int hashCode()
124 {
125 int result = 17;
126
127 result = 37 * result + ( name != null ? name.hashCode() : 0 );
128 result = 37 * result + ( head != null ? head.hashCode() : 0 );
129 result = 37 * result + ( placement != null ? placement.hashCode() : 0 );
130
131 return result;
132 }
133
134
135
136
137
138
139 public void setHead( String head )
140 {
141 this.head = head;
142 }
143
144
145
146
147
148
149 public void setName( String name )
150 {
151 this.name = name;
152 }
153
154
155
156
157
158
159 public java.lang.String toString()
160 {
161 StringBuilder buf = new StringBuilder( 128 );
162
163 buf.append( "name = '" );
164 buf.append( getName() );
165 buf.append( "'" );
166 buf.append( "\n" );
167 buf.append( "head = '" );
168 buf.append( getHead() );
169 buf.append( "'" );
170 buf.append( "\n" );
171 buf.append( "placement = '" );
172 buf.append( getPlacement() );
173 buf.append( "'" );
174
175 return buf.toString();
176 }
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195 public void setPlacement(String placement)
196 throws IllegalArgumentException
197 {
198 char[] chars = placement.toCharArray();
199 for ( int i = 0; i < chars.length; i++ )
200 {
201 switch ( chars[i] )
202 {
203 case 'X':
204 case 'a':
205 case 'o':
206 case 'p':
207 case 't':
208 case 'c':
209 case 'm':
210 case 'f':
211 break;
212 default:
213 throw new IllegalArgumentException( "Placement should be a combination of the letters 'Xaoptcmf'." );
214 }
215 }
216 this.placement = placement;
217 }
218
219
220 }