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