diff options
Diffstat (limited to 'src/Chapter5/trends/TCDateInfo.java')
-rw-r--r-- | src/Chapter5/trends/TCDateInfo.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/Chapter5/trends/TCDateInfo.java b/src/Chapter5/trends/TCDateInfo.java new file mode 100644 index 0000000..88450e9 --- /dev/null +++ b/src/Chapter5/trends/TCDateInfo.java @@ -0,0 +1,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; + } + } + +} |