while (dateIter.hasNext()) {
DateAnnot date = (DateAnnot) dateIter.next();
Iterator time1Iter = timeIndex.iterator();
while (time1Iter.hasNext()) {
TimeAnnot time1 = (TimeAnnot) time1Iter.next();
Iterator time2Iter = timeIndex.iterator();
while (time2Iter.hasNext()) {
TimeAnnot time2 = (TimeAnnot) time2Iter.next();
// times must be different annotations
if (time1 != time2) {
// compute the begin and end of the span
int minBegin = Math.min(Math.min(time1.getBegin(), time2.getBegin()), Math.min(date
.getBegin(), room.getBegin()));
int maxEnd = Math.max(Math.max(time1.getEnd(), time2.getEnd()), Math.max(date
.getEnd(), room.getEnd()));
// span must be smaller than the window size?
if (maxEnd - minBegin < mWindowSize) {
// span must not overlap the last annotation we made