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