1
2
3
4
5
6 package org.apache.maven.doxia.site.decoration;
7
8
9
10
11
12
13 @SuppressWarnings( "all" )
14 public class PublishDate
15 implements java.io.Serializable, java.lang.Cloneable
16 {
17
18
19
20
21
22
23
24
25
26 private String position = "left";
27
28
29
30
31 private String format = "yyyy-MM-dd";
32
33
34
35
36
37
38
39
40
41
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 }
57
58
59
60
61
62
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 }
84
85
86
87
88
89
90 public String getFormat()
91 {
92 return this.format;
93 }
94
95
96
97
98
99
100
101 public String getPosition()
102 {
103 return this.position;
104 }
105
106
107
108
109
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 }
120
121
122
123
124
125
126 public void setFormat( String format )
127 {
128 this.format = format;
129 }
130
131
132
133
134
135
136
137 public void setPosition( String position )
138 {
139 this.position = position;
140 }
141
142
143
144
145
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 }
161
162 }