summaryrefslogtreecommitdiff
path: root/src/Chapter5/trends/DateInfo.java
blob: 209f4a3ed7ce71fe49f1e049b422e2eee5273bc2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* TweetTracker. Copyright (c) Arizona Board of Regents on behalf of Arizona State University
 * @author shamanth
 */
package Chapter5.trends;

import java.util.Date;

public class DateInfo implements Comparable
{
    public Date d;
    public int count;

    public int compareTo(Object o) {
        DateInfo temp = (DateInfo) o;
        if(temp.d.after(this.d))
        {
            return -1;
        }
        else
        if(temp.d.before(this.d))
        {
            return 1;
        }
        else
        {
            return 0;
        }
    }
}