Back to project page PrincePolo.
The source code is released under:
GNU General Public License
If you think the Android project PrincePolo listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package se.agile.model; /*from w w w. ja v a2s . co m*/ import java.util.Date; public abstract class Notification<T> implements Comparable<Notification<T>>{ private static int counter = 0; private int id; private String contentText, contentTitle; private T data; private Date date; private boolean hasBeenViewed; public Notification(T data){ this.data = data; this.date = new Date(); id=counter; counter++; } public int getId(){ return id; } public String getContentText() { return contentText; } public void setContentText(String contentText) { this.contentText = contentText; } public String getContentTitle() { return contentTitle; } public void setContentTitle(String contentTitle) { this.contentTitle = contentTitle; } public T getData() { return data; } public void setData(T data) { this.data = data; } public Date getDate() { return date; } public boolean hasBeenViewed() { return hasBeenViewed; } public void setHasBeenViewed(boolean hasBeenViewed) { this.hasBeenViewed = hasBeenViewed; } @Override public int compareTo(Notification<T> o){ return this.date.compareTo(o.getDate()); } }