void removeIntervalInternal(int i) {
      intervals.remove(i);
      if (isAttachedToTree()) {   // for detached node, do not update tree node count
        assert myTree.keySize > 0 : myTree.keySize;
        myTree.keySize--;
      }
    }
void removeIntervalInternal(int i)