code: @Override
      @SuppressWarnings("unchecked")
      @ConstantTime(amortized = true)
      public void meld(MergeableAddressableHeap<K, V> other) {
          SimpleFibonacciHeap<K, V> h = (SimpleFibonacciHeap<K, V>) other;
  
          // check same comparator
          if (comparator != null) {
              if (h.comparator == null || !h.comparator.equals(comparator)) {
                  throw new IllegalArgumentException("Cannot meld heaps using different comparators!");
              }
          } else if (h.comparator != null) {
              throw new IllegalArgumentException("Cannot meld heaps using different comparators!");
          }
  
          if (h.other != h) {
              throw new IllegalStateException("A heap cannot be used after a meld.");
          }
  
          // meld
          if (root == null) {
              root = h.root;
          } else if (h.root != null) {
              if (comparator == null) {
                  if (((Comparable<? super K>) h.root.key).compareTo(root.key) < 0) {
                      root = link(root, h.root);
                  } else {
                      link(h.root, root);
                  }
              } else {
                  if (comparator.compare(h.root.key, root.key) < 0) {
                      root = link(root, h.root);
                  } else {
                      link(h.root, root);
                  }
              }
          }
          size += h.size;
  
          // clear other
          h.size = 0;
          h.root = null;
  
          // take ownership
          h.other = this;
      }
docs: {@inheritDoc}