Definitely separate model data from view data.
Here is a different model than the one proposed in the answer to paislee.
Map<Calendar, String> thisIsAllYouNeedForTheModel = new HashMap<Calendar, String>(); Calendar thisIsTheKey = Calendar.getInstance(); thisIsTheKey.clear(); thisIsTheKey.set(Calendar.YEAR, theYear); thisIsTheKey.set(Calendar.MONTH, theMonth); thisIsTheKey.set(Calendar.DAY_OF_MONTH, theMonth); thisIsTheKey.set(Calendar.HOUR, theHour); thisIsTheKey.set(Calendar.MINUTE, theMinute); thisIsTheKey.set(Calendar.SECOND, theSecond); thisIsAllYouNeedForTheModel.put(thisIsTheKey, data);
Edit: stupid me. Map<Calendar, String> is my suggestion.
source share