public Intervals not() {
      if (isEmpty()) {
        return ALL_INTERVAL;
      }
      Intervals result = new Intervals();
      long firstLB = getLowerBound(0);
      if (firstLB != Long.MIN_VALUE) {
        result.addInterval(Long.MIN_VALUE, firstLB - 1);
      }

      int intervalSize = getIntervalSize();
      for (int i = 0; i < intervalSize - 1; i++) {
        long currentUB = getUpperBound(i);
        long nextLB = getLowerBound(i + 1);
        if (currentUB + 1 <= nextLB - 1) {
          result.addInterval(currentUB + 1, nextLB - 1);
        }
      }

      long lastUB = getUpperBound(result.getIntervalSize() - 1);
      if (lastUB != Long.MAX_VALUE) {
        result.addInterval(lastUB + 1, Long.MAX_VALUE);
      }
      return result;
    }
Merge an interval of [lowerBound, upperBound] with the last interval if they can be merged,
or just add it as the last interval if its lowerBound is larger than the upperBound of the
last interval. If the upperBound of the new interval is less than the lowerBound of the last
interval, nothing will be done.

@param lowerBound
@param upperBound
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/TimeValuePairUtils.java