View Javadoc

1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    Generated by Modello 1.4.1 on 2011-05-07 21:20:49,
4    any modifications will be overwritten.
5    ==============================================================
6    */
7   
8   package com.soebes.maven.plugins.mlv.model;
9   
10  /**
11   * Class LicenseItem.
12   * 
13   * @version $Revision$ $Date$
14   */
15  @SuppressWarnings( "all" )
16  public class LicenseItem
17      implements java.io.Serializable
18  {
19  
20        //--------------------------/
21       //- Class/Member Variables -/
22      //--------------------------/
23  
24      /**
25       * 
26       * 						
27       * 							The id field is used as unique identifier.
28       * 						
29       * 					
30       */
31      private String id;
32  
33      /**
34       * 
35       * 						
36       * 							The description field can be used to describe the
37       * particular 
38       * 							license or give supplemental information about the
39       * license.
40       * 						
41       * 					
42       */
43      private String description;
44  
45      /**
46       * Field names.
47       */
48      private java.util.List<String> names;
49  
50      /**
51       * Field urls.
52       */
53      private java.util.List<String> urls;
54  
55  
56        //-----------/
57       //- Methods -/
58      //-----------/
59  
60      /**
61       * Method addName.
62       * 
63       * @param string
64       */
65      public void addName( String string )
66      {
67          getNames().add( string );
68      } //-- void addName( String )
69  
70      /**
71       * Method addUrl.
72       * 
73       * @param string
74       */
75      public void addUrl( String string )
76      {
77          getUrls().add( string );
78      } //-- void addUrl( String )
79  
80      /**
81       * Method equals.
82       * 
83       * @param other
84       * @return boolean
85       */
86      public boolean equals( Object other )
87      {
88          if ( this == other )
89          {
90              return true;
91          }
92  
93          if ( !( other instanceof LicenseItem ) )
94          {
95              return false;
96          }
97  
98          LicenseItem that = (LicenseItem) other;
99          boolean result = true;
100 
101         result = result && ( getId() == null ? that.getId() == null : getId().equals( that.getId() ) );
102 
103         return result;
104     } //-- boolean equals( Object )
105 
106     /**
107      * Get the description field can be used to describe the
108      * particular 
109      * 							license or give supplemental information about the
110      * license.
111      * 
112      * @return String
113      */
114     public String getDescription()
115     {
116         return this.description;
117     } //-- String getDescription()
118 
119     /**
120      * Get the id field is used as unique identifier.
121      * 
122      * @return String
123      */
124     public String getId()
125     {
126         return this.id;
127     } //-- String getId()
128 
129     /**
130      * Method getNames.
131      * 
132      * @return List
133      */
134     public java.util.List<String> getNames()
135     {
136         if ( this.names == null )
137         {
138             this.names = new java.util.ArrayList<String>();
139         }
140 
141         return this.names;
142     } //-- java.util.List<String> getNames()
143 
144     /**
145      * Method getUrls.
146      * 
147      * @return List
148      */
149     public java.util.List<String> getUrls()
150     {
151         if ( this.urls == null )
152         {
153             this.urls = new java.util.ArrayList<String>();
154         }
155 
156         return this.urls;
157     } //-- java.util.List<String> getUrls()
158 
159     /**
160      * Method hashCode.
161      * 
162      * @return int
163      */
164     public int hashCode()
165     {
166         int result = 17;
167 
168         result = 37 * result + ( id != null ? id.hashCode() : 0 );
169 
170         return result;
171     } //-- int hashCode()
172 
173     /**
174      * Method removeName.
175      * 
176      * @param string
177      */
178     public void removeName( String string )
179     {
180         getNames().remove( string );
181     } //-- void removeName( String )
182 
183     /**
184      * Method removeUrl.
185      * 
186      * @param string
187      */
188     public void removeUrl( String string )
189     {
190         getUrls().remove( string );
191     } //-- void removeUrl( String )
192 
193     /**
194      * Set the description field can be used to describe the
195      * particular 
196      * 							license or give supplemental information about the
197      * license.
198      * 
199      * @param description
200      */
201     public void setDescription( String description )
202     {
203         this.description = description;
204     } //-- void setDescription( String )
205 
206     /**
207      * Set the id field is used as unique identifier.
208      * 
209      * @param id
210      */
211     public void setId( String id )
212     {
213         this.id = id;
214     } //-- void setId( String )
215 
216     /**
217      * Set the list of names give the possible names of a license.
218      * 
219      * @param names
220      */
221     public void setNames( java.util.List<String> names )
222     {
223         this.names = names;
224     } //-- void setNames( java.util.List )
225 
226     /**
227      * Set the list of urls gives the possible URL's under which
228      * 							a license can be reached.
229      * 
230      * @param urls
231      */
232     public void setUrls( java.util.List<String> urls )
233     {
234         this.urls = urls;
235     } //-- void setUrls( java.util.List )
236 
237     /**
238      * Method toString.
239      * 
240      * @return String
241      */
242     public java.lang.String toString()
243     {
244         StringBuilder buf = new StringBuilder( 128 );
245 
246         buf.append( "id = '" );
247         buf.append( getId() );
248         buf.append( "'" );
249 
250         return buf.toString();
251     } //-- java.lang.String toString()
252 
253 }