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