public int compare(Interval i1, Interval i2) {
            // TODO Auto-generated method stub
            if (i1.start != i2.start) {
                return i1.start - i2.start;
            } else {
                return i1.end - i2.end;
            }
        }