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