private List <CT_Col> getOverlappingCols(CT_Col newCol, TreeSet <CT_Col> trackedCols) { CT_Col lower = trackedCols.Lower(newCol); TreeSet <CT_Col> potentiallyOverlapping = lower == null ? trackedCols : trackedCols.TailSet(lower, overlaps(lower, newCol)); List <CT_Col> overlapping = new List <CT_Col>(); foreach (CT_Col existing in potentiallyOverlapping) { if (overlaps(newCol, existing)) { overlapping.Add(existing); } else { break; } } return(overlapping); }