private boolean removeInterval(@NotNull E key) {
      myTree.checkBelongsToTheTree(key, true);
      myTree.assertUnderWriteLock();
      for (int i = intervals.size() - 1; i >= 0; i--) {
        Supplier<? extends E> interval = intervals.get(i);
        E t = interval.get();
        if (t == key) {
          removeIntervalInternal(i);
          if (intervals.isEmpty()) {
            myTree.removeNode(this);
            return true;
          }
          return false;
        }
      }
      assert false: "interval not found: "+key +"; "+ intervals;
      return false;
    }
private boolean removeInterval(@NotNull E key)