private boolean overlap(Range<Type> first, Range<Type> second) {
        int comparison = type.comparator.compare(first.end, second.start);
        return   comparison  > 0
              || comparison == 0 && (startInclusive || endInclusive || first.start.equals(first.end) || second.start.equals(second.end));
    }
Assumption: first.start <= second.start
Then there is overlap if
first.end  > second.start
first.end == second.start AND either of
  ranges are inclusive at either end, OR
  either range is a (logically empty) point (a, a), since this dominated by (or equal to) the other range.
container-search/src/main/java/com/yahoo/prelude/query/MultiRangeItem.java