1
2
3
4
5
6
7
8
9
10
11 package org.apache.maven.doxia.site.decoration;
12
13
14
15
16
17
18 @SuppressWarnings( "all" )
19 public class PublishDate
20 implements java.io.Serializable, java.lang.Cloneable
21 {
22
23
24
25
26
27
28
29
30
31 private String position = "left";
32
33
34
35
36 private String format = "yyyy-MM-dd";
37
38
39
40
41
42
43
44
45
46
47
48 private String timezone = "Etc/UTC";
49
50
51
52
53
54
55
56
57
58
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 }
74
75
76
77
78
79
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 }
102
103
104
105
106
107
108 public String getFormat()
109 {
110 return this.format;
111 }
112
113
114
115
116
117
118
119 public String getPosition()
120 {
121 return this.position;
122 }
123
124
125
126
127
128
129
130
131
132 public String getTimezone()
133 {
134 return this.timezone;
135 }
136
137
138
139
140
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 }
152
153
154
155
156
157
158 public void setFormat( String format )
159 {
160 this.format = format;
161 }
162
163
164
165
166
167
168
169 public void setPosition( String position )
170 {
171 this.position = position;
172 }
173
174
175
176
177
178
179
180
181
182 public void setTimezone( String timezone )
183 {
184 this.timezone = timezone;
185 }
186
187
188
189
190
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 }
210
211 }