1 |
package dk.thoerup.marketstats; |
package dk.thoerup.marketstats; |
2 |
|
|
3 |
class CommentBean implements Comparable<CommentBean>{ |
import java.io.Serializable; |
4 |
|
import java.util.Date; |
5 |
|
|
6 |
|
public class CommentBean implements Comparable<CommentBean>, Serializable{ |
7 |
|
private static final long serialVersionUID = 1L; |
8 |
|
|
9 |
public String locale; |
public String locale; |
10 |
public String author; |
public String author; |
11 |
public int rating; |
public int rating; |
12 |
public long time; |
public long time; |
13 |
public String text; |
public String text; |
14 |
|
|
15 |
|
|
16 |
|
public String getAuthor() { |
17 |
|
return author; |
18 |
|
} |
19 |
|
|
20 |
|
public int getRating() { |
21 |
|
return rating; |
22 |
|
} |
23 |
|
|
24 |
|
public String getTime() { |
25 |
|
return new Date(time).toString(); |
26 |
|
} |
27 |
|
|
28 |
|
public String getText() { |
29 |
|
return text; |
30 |
|
} |
31 |
|
|
32 |
|
|
33 |
@Override |
@Override |
34 |
public int compareTo(CommentBean arg0) { |
public int compareTo(CommentBean arg0) { |
35 |
Long l = new Long(time); |
Long l = new Long(time); |