summaryrefslogtreecommitdiff
path: root/src/Chapter5/trends/TCDateInfo.java
blob: 88450e9f4c517b5e09ab4e72b403492f599d287c (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
30
31
/* TweetTracker. Copyright (c) Arizona Board of Regents on behalf of Arizona State University
 * @author shamanth
 */
package Chapter5.trends;

import java.util.Date;
import java.util.HashMap;

public class TCDateInfo implements Comparable
{
    public Date d;
    public HashMap<String,Integer> wordcount = new HashMap<String,Integer>();

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

}