* @param date the date
* @return the matching model or null if no match
*/
public Time findModel(Date date) {
if (!initialized) initList();
DateWrapper w = new DateWrapper();
DateWrapper w2 = new DateWrapper(date);
w = w.clearTime();
w = w.addHours(w2.getHours());
w = w.addMinutes(w2.getMinutes());
long l = w.getTime();
List<Time> times = store.getModels();
for (int i = 0; i < times.size(); i++) {
Time t1 = store.getAt(i);
Time t2 = store.getAt(i + 1);
long l1 = t1.getDate().getTime();
long l2;
if (t2 == null) {
DateWrapper temp = new DateWrapper();
temp = temp.clearTime();
temp = temp.addMinutes(t1.getMinutes() + increment);
temp = temp.addHours(t1.getHour());
l2 = temp.asDate().getTime();
} else {
l2 = t2.getDate().getTime();
}
if (l >= l1 && l < l2) {