View Javadoc
1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    
4    Generated by Modello 2.4.0,
5    
6    any modifications will be overwritten.
7    
8    ==============================================================
9    */
10  
11  package org.apache.maven.doxia.site.decoration;
12  
13  /**
14   * Modify display properties for date published.
15   * 
16   * @version $Revision$ $Date$
17   */
18  @SuppressWarnings( "all" )
19  public class PublishDate
20      implements java.io.Serializable, java.lang.Cloneable
21  {
22  
23        //--------------------------/
24       //- Class/Member Variables -/
25      //--------------------------/
26  
27      /**
28       * Where to place the date published (left, right,
29       * navigation-top, navigation-bottom, bottom).
30       */
31      private String position = "left";
32  
33      /**
34       * Date format to use.
35       */
36      private String format = "yyyy-MM-dd";
37  
38      /**
39       * 
40       *             
41       *               The timezone to use. Use <code>system</code>
42       * for the default locale for this instance
43       *               of the Java Virtual Machine. Refer to
44       * <code>java.util.TimeZone</code> for details.
45       *             
46       *           
47       */
48      private String timezone = "Etc/UTC";
49  
50  
51        //-----------/
52       //- Methods -/
53      //-----------/
54  
55      /**
56       * Method clone.
57       * 
58       * @return PublishDate
59       */
60      public PublishDate clone()
61      {
62          try
63          {
64              PublishDate copy = (PublishDate) super.clone();
65  
66              return copy;
67          }
68          catch ( java.lang.Exception ex )
69          {
70              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
71                  + " does not support clone()" ).initCause( ex );
72          }
73      } //-- PublishDate clone()
74  
75      /**
76       * Method equals.
77       * 
78       * @param other a other object.
79       * @return boolean
80       */
81      public boolean equals( Object other )
82      {
83          if ( this == other )
84          {
85              return true;
86          }
87  
88          if ( !( other instanceof PublishDate ) )
89          {
90              return false;
91          }
92  
93          PublishDate that = (PublishDate) other;
94          boolean result = true;
95  
96          result = result && ( getPosition() == null ? that.getPosition() == null : getPosition().equals( that.getPosition() ) );
97          result = result && ( getFormat() == null ? that.getFormat() == null : getFormat().equals( that.getFormat() ) );
98          result = result && ( getTimezone() == null ? that.getTimezone() == null : getTimezone().equals( that.getTimezone() ) );
99  
100         return result;
101     } //-- boolean equals( Object )
102 
103     /**
104      * Get date format to use.
105      * 
106      * @return String
107      */
108     public String getFormat()
109     {
110         return this.format;
111     } //-- String getFormat()
112 
113     /**
114      * Get where to place the date published (left, right,
115      * navigation-top, navigation-bottom, bottom).
116      * 
117      * @return String
118      */
119     public String getPosition()
120     {
121         return this.position;
122     } //-- String getPosition()
123 
124     /**
125      * Get the timezone to use. Use <code>system</code> for the
126      * default locale for this instance
127      *               of the Java Virtual Machine. Refer to
128      * <code>java.util.TimeZone</code> for details.
129      * 
130      * @return String
131      */
132     public String getTimezone()
133     {
134         return this.timezone;
135     } //-- String getTimezone()
136 
137     /**
138      * Method hashCode.
139      * 
140      * @return int
141      */
142     public int hashCode()
143     {
144         int result = 17;
145 
146         result = 37 * result + ( position != null ? position.hashCode() : 0 );
147         result = 37 * result + ( format != null ? format.hashCode() : 0 );
148         result = 37 * result + ( timezone != null ? timezone.hashCode() : 0 );
149 
150         return result;
151     } //-- int hashCode()
152 
153     /**
154      * Set date format to use.
155      * 
156      * @param format a format object.
157      */
158     public void setFormat( String format )
159     {
160         this.format = format;
161     } //-- void setFormat( String )
162 
163     /**
164      * Set where to place the date published (left, right,
165      * navigation-top, navigation-bottom, bottom).
166      * 
167      * @param position a position object.
168      */
169     public void setPosition( String position )
170     {
171         this.position = position;
172     } //-- void setPosition( String )
173 
174     /**
175      * Set the timezone to use. Use <code>system</code> for the
176      * default locale for this instance
177      *               of the Java Virtual Machine. Refer to
178      * <code>java.util.TimeZone</code> for details.
179      * 
180      * @param timezone a timezone object.
181      */
182     public void setTimezone( String timezone )
183     {
184         this.timezone = timezone;
185     } //-- void setTimezone( String )
186 
187     /**
188      * Method toString.
189      * 
190      * @return String
191      */
192     public java.lang.String toString()
193     {
194         StringBuilder buf = new StringBuilder( 128 );
195 
196         buf.append( "position = '" );
197         buf.append( getPosition() );
198         buf.append( "'" );
199         buf.append( "\n" ); 
200         buf.append( "format = '" );
201         buf.append( getFormat() );
202         buf.append( "'" );
203         buf.append( "\n" ); 
204         buf.append( "timezone = '" );
205         buf.append( getTimezone() );
206         buf.append( "'" );
207 
208         return buf.toString();
209     } //-- java.lang.String toString()
210 
211 }