View Javadoc

1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    Generated by Modello 1.4.1 on 2012-04-17 22:27:23,
4    any modifications will be overwritten.
5    ==============================================================
6    */
7   
8   package org.apache.maven.doxia.site.decoration;
9   
10  /**
11   * Modify display properties for date published.
12   * 
13   * @version $Revision$ $Date$
14   */
15  @SuppressWarnings( "all" )
16  public class PublishDate
17      implements java.io.Serializable, java.lang.Cloneable
18  {
19  
20        //--------------------------/
21       //- Class/Member Variables -/
22      //--------------------------/
23  
24      /**
25       * Where to place the date published (left, right,
26       * navigation-top, navigation-bottom, bottom).
27       */
28      private String position;
29  
30      /**
31       * Date format to use. The default is ISO-8601 yyyy-MM-dd.
32       */
33      private String format = "yyyy-MM-dd";
34  
35  
36        //-----------/
37       //- Methods -/
38      //-----------/
39  
40      /**
41       * Method clone.
42       * 
43       * @return PublishDate
44       */
45      public PublishDate clone()
46      {
47          try
48          {
49              PublishDate copy = (PublishDate) super.clone();
50  
51              return copy;
52          }
53          catch ( java.lang.Exception ex )
54          {
55              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
56                  + " does not support clone()" ).initCause( ex );
57          }
58      } //-- PublishDate clone()
59  
60      /**
61       * Method equals.
62       * 
63       * @param other
64       * @return boolean
65       */
66      public boolean equals( Object other )
67      {
68          if ( this == other )
69          {
70              return true;
71          }
72  
73          if ( !( other instanceof PublishDate ) )
74          {
75              return false;
76          }
77  
78          PublishDate that = (PublishDate) other;
79          boolean result = true;
80  
81          result = result && ( getPosition() == null ? that.getPosition() == null : getPosition().equals( that.getPosition() ) );
82          result = result && ( getFormat() == null ? that.getFormat() == null : getFormat().equals( that.getFormat() ) );
83  
84          return result;
85      } //-- boolean equals( Object )
86  
87      /**
88       * Get date format to use. The default is ISO-8601 yyyy-MM-dd.
89       * 
90       * @return String
91       */
92      public String getFormat()
93      {
94          return this.format;
95      } //-- String getFormat()
96  
97      /**
98       * Get where to place the date published (left, right,
99       * navigation-top, navigation-bottom, bottom).
100      * 
101      * @return String
102      */
103     public String getPosition()
104     {
105         return this.position;
106     } //-- String getPosition()
107 
108     /**
109      * Method hashCode.
110      * 
111      * @return int
112      */
113     public int hashCode()
114     {
115         int result = 17;
116 
117         result = 37 * result + ( position != null ? position.hashCode() : 0 );
118         result = 37 * result + ( format != null ? format.hashCode() : 0 );
119 
120         return result;
121     } //-- int hashCode()
122 
123     /**
124      * Set date format to use. The default is ISO-8601 yyyy-MM-dd.
125      * 
126      * @param format
127      */
128     public void setFormat( String format )
129     {
130         this.format = format;
131     } //-- void setFormat( String )
132 
133     /**
134      * Set where to place the date published (left, right,
135      * navigation-top, navigation-bottom, bottom).
136      * 
137      * @param position
138      */
139     public void setPosition( String position )
140     {
141         this.position = position;
142     } //-- void setPosition( String )
143 
144     /**
145      * Method toString.
146      * 
147      * @return String
148      */
149     public java.lang.String toString()
150     {
151         StringBuilder buf = new StringBuilder( 128 );
152 
153         buf.append( "position = '" );
154         buf.append( getPosition() );
155         buf.append( "'" );
156         buf.append( "\n" ); 
157         buf.append( "format = '" );
158         buf.append( getFormat() );
159         buf.append( "'" );
160 
161         return buf.toString();
162     } //-- java.lang.String toString()
163 
164 }