View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   // Generated by Modello 1.9.1,
3   // any modifications will be overwritten.
4   // ==============================================================
5   
6   package org.apache.maven.plugins.javadoc.options;
7   
8   /**
9    * A Tag parameter.
10   * 
11   * @version $Revision$ $Date$
12   */
13  @SuppressWarnings( "all" )
14  public class Tag
15      implements java.io.Serializable
16  {
17  
18        //--------------------------/
19       //- Class/Member Variables -/
20      //--------------------------/
21  
22      /**
23       * Name of the tag.
24       */
25      private String name;
26  
27      /**
28       * Head of the tag.
29       */
30      private String head;
31  
32  
33        //-----------/
34       //- Methods -/
35      //-----------/
36  
37      /**
38       * Method equals.
39       * 
40       * @param other
41       * @return boolean
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      } //-- boolean equals( Object )
63  
64      /**
65       * Get head of the tag.
66       * 
67       * @return String
68       */
69      public String getHead()
70      {
71          return this.head;
72      } //-- String getHead()
73  
74      /**
75       * Get name of the tag.
76       * 
77       * @return String
78       */
79      public String getName()
80      {
81          return this.name;
82      } //-- String getName()
83  
84      /**
85       * Method hashCode.
86       * 
87       * @return int
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      } //-- int hashCode()
98  
99      /**
100      * Set head of the tag.
101      * 
102      * @param head
103      */
104     public void setHead( String head )
105     {
106         this.head = head;
107     } //-- void setHead( String )
108 
109     /**
110      * Set name of the tag.
111      * 
112      * @param name
113      */
114     public void setName( String name )
115     {
116         this.name = name;
117     } //-- void setName( String )
118 
119     /**
120      * Method toString.
121      * 
122      * @return String
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     } //-- java.lang.String toString()
138 
139     
140     /**
141      * Field placement
142      */
143     private String placement;
144 
145     /**
146      * Get the placement.
147      */
148     public String getPlacement()
149     {
150         return this.placement;
151     }
152 
153     /**
154      * Set a Placement. Should be a combinaison of the letters:
155      * <ul>
156      * <li> X (disable tag)</li>
157      * <li> a (all)</li>
158      * <li> o (overview)</li>
159      * <li> p (packages)</li>
160      * <li> t (types, that is classes and interfaces)</li>
161      * <li> c (constructors)</li>
162      * <li> m (methods)</li>
163      * <li> f (fields)</li>
164      * </ul>
165      *
166      * @param placement
167      * @throws IllegalArgumentException  if not a valid combinaison of the letters
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 }