View Javadoc

1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    Generated by Modello 1.4.1 on 2012-11-07 17:28:30,
4    any modifications will be overwritten.
5    ==============================================================
6    */
7   
8   package org.apache.maven.plugin.plugin;
9   
10  /**
11   * Plugin requirements.
12   * 
13   * @version $Revision$ $Date$
14   */
15  @SuppressWarnings( "all" )
16  public class Requirements
17      implements java.io.Serializable
18  {
19  
20        //--------------------------/
21       //- Class/Member Variables -/
22      //--------------------------/
23  
24      /**
25       * The minimum version of Maven to run this plugin.
26       */
27      private String maven;
28  
29      /**
30       * The minimum version of the JDK to run this plugin.
31       */
32      private String jdk;
33  
34      /**
35       * The minimum memory needed to run this plugin.
36       */
37      private String memory;
38  
39      /**
40       * The minimum diskSpace needed to run this plugin.
41       */
42      private String diskSpace;
43  
44      /**
45       * Field others.
46       */
47      private java.util.Properties others;
48  
49  
50        //-----------/
51       //- Methods -/
52      //-----------/
53  
54      /**
55       * Method addOther.
56       * 
57       * @param key
58       * @param value
59       */
60      public void addOther( String key, String value )
61      {
62          getOthers().put( key, value );
63      } //-- void addOther( String, String )
64  
65      /**
66       * Method equals.
67       * 
68       * @param other
69       * @return boolean
70       */
71      public boolean equals( Object other )
72      {
73          if ( this == other )
74          {
75              return true;
76          }
77  
78          if ( !( other instanceof Requirements ) )
79          {
80              return false;
81          }
82  
83          Requirements that = (Requirements) other;
84          boolean result = true;
85  
86          result = result && ( getMaven() == null ? that.getMaven() == null : getMaven().equals( that.getMaven() ) );
87          result = result && ( getJdk() == null ? that.getJdk() == null : getJdk().equals( that.getJdk() ) );
88  
89          return result;
90      } //-- boolean equals( Object )
91  
92      /**
93       * Get the minimum diskSpace needed to run this plugin.
94       * 
95       * @return String
96       */
97      public String getDiskSpace()
98      {
99          return this.diskSpace;
100     } //-- String getDiskSpace()
101 
102     /**
103      * Get the minimum version of the JDK to run this plugin.
104      * 
105      * @return String
106      */
107     public String getJdk()
108     {
109         return this.jdk;
110     } //-- String getJdk()
111 
112     /**
113      * Get the minimum version of Maven to run this plugin.
114      * 
115      * @return String
116      */
117     public String getMaven()
118     {
119         return this.maven;
120     } //-- String getMaven()
121 
122     /**
123      * Get the minimum memory needed to run this plugin.
124      * 
125      * @return String
126      */
127     public String getMemory()
128     {
129         return this.memory;
130     } //-- String getMemory()
131 
132     /**
133      * Method getOthers.
134      * 
135      * @return Properties
136      */
137     public java.util.Properties getOthers()
138     {
139         if ( this.others == null )
140         {
141             this.others = new java.util.Properties();
142         }
143 
144         return this.others;
145     } //-- java.util.Properties getOthers()
146 
147     /**
148      * Method hashCode.
149      * 
150      * @return int
151      */
152     public int hashCode()
153     {
154         int result = 17;
155 
156         result = 37 * result + ( maven != null ? maven.hashCode() : 0 );
157         result = 37 * result + ( jdk != null ? jdk.hashCode() : 0 );
158 
159         return result;
160     } //-- int hashCode()
161 
162     /**
163      * Set the minimum diskSpace needed to run this plugin.
164      * 
165      * @param diskSpace
166      */
167     public void setDiskSpace( String diskSpace )
168     {
169         this.diskSpace = diskSpace;
170     } //-- void setDiskSpace( String )
171 
172     /**
173      * Set the minimum version of the JDK to run this plugin.
174      * 
175      * @param jdk
176      */
177     public void setJdk( String jdk )
178     {
179         this.jdk = jdk;
180     } //-- void setJdk( String )
181 
182     /**
183      * Set the minimum version of Maven to run this plugin.
184      * 
185      * @param maven
186      */
187     public void setMaven( String maven )
188     {
189         this.maven = maven;
190     } //-- void setMaven( String )
191 
192     /**
193      * Set the minimum memory needed to run this plugin.
194      * 
195      * @param memory
196      */
197     public void setMemory( String memory )
198     {
199         this.memory = memory;
200     } //-- void setMemory( String )
201 
202     /**
203      * Set others requirements properties.
204      * 
205      * @param others
206      */
207     public void setOthers( java.util.Properties others )
208     {
209         this.others = others;
210     } //-- void setOthers( java.util.Properties )
211 
212     /**
213      * Method toString.
214      * 
215      * @return String
216      */
217     public java.lang.String toString()
218     {
219         StringBuilder buf = new StringBuilder( 128 );
220 
221         buf.append( "maven = '" );
222         buf.append( getMaven() );
223         buf.append( "'" );
224         buf.append( "\n" ); 
225         buf.append( "jdk = '" );
226         buf.append( getJdk() );
227         buf.append( "'" );
228 
229         return buf.toString();
230     } //-- java.lang.String toString()
231 
232 }