Back to project page Rejsekort-Reminder.
The source code is released under:
GNU General Public License
If you think the Android project Rejsekort-Reminder 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 com.example.publictransportation.service; /*from www . j a v a 2s .c o m*/ import java.text.Format; import java.text.SimpleDateFormat; import java.util.Date; public class LogItem { private LogTypes type; private String data; private Date date; public LogItem(LogTypes type, String data) { this.type = type; this.data = data; this.date = new Date(); } @Override public String toString() { Format formatter = new SimpleDateFormat("dd/MM HH:mm:ss"); String formattedDate = formatter.format(date); return formattedDate + ", " + String.valueOf(type) + ", " + data; } public LogTypes getType() { return type; } }