docs: void putAll(Map<Long,Long> m) {
          int n = m.size();
          if (n == 0)
              return;
          if (n > threshold) // conservatively pre-expand
              resize(capacity(n));
  
          for (Map.Entry<Long,Long> e : m.entrySet())
              put(e.getKey(), e.getValue());
      }
  
      /**
       * Removes the mapping for this key from this map if present.
       *
       * @param key key whose mapping is to be removed from the map
       * @return the previous value associated with <tt>key</tt>, or
       *         <tt>null</tt> if there was no mapping for <tt>key</tt>.
       *         (A <tt>null</tt> return can also indicate that the map
       *         previously associated <tt>null</tt> with <tt>key</tt>.)
       */
      long remove(long key) {
          long k = key;
          long[] tab = table;
          int len = tab.length;
          int i = hash(k, len);
  
          while (true) {
              long item = tab[i];
              if (item == k) {
                  modCount++;
                  size--;
                  long oldValue = tab[i + 1];
                  tab[i + 1] = 0;
                  tab[i] = 0;
                  closeDeletion(i);
                  return oldValue;
              }
              if (item == 0)
                  return -1;
              i = nextKeyIndex(i, len);
          }
  
      }
  
      /**
       * Removes the specified key-value mapping from the map if it is present.
       *
       * @param   key   possible key
       * @param   value possible value
       * @return  <code>true</code> if and only if the specified key-value
       *          mapping was in the map
       */
      @SuppressWarnings("unused")
      private boolean removeMapping(long key, long value) {
          long k = key;
          long[] tab = table;
          int len = tab.length;
          int i = hash(k, len);
  
          while (true) {
              long item = tab[i];
              if (item == k) {
                  if (tab[i + 1] != value)
                      return false;
                  modCount++;
                  size--;
                  tab[i] = 0;
                  tab[i + 1] = 0;
                  closeDeletion(i);
                  return true;
              }
              if (item == 0)
                  return false;
              i = nextKeyIndex(i, len);
          }
      }
  
      /**
       * Rehash all possibly-colliding entries following a
       * deletion. This preserves the linear-probe
       * collision properties required by get, put, etc.
       *
       * @param d the index of a newly empty deleted slot
       */
      private void closeDeletion(int d) {
          // Adapted from Knuth Section 6.4 Algorithm R
          long[] tab = table;
          int len = tab.length;
  
          // Look for items to swap into newly vacated slot
          // starting at index immediately following deletion,
          // and continuing until a null slot is seen, indicating
          // the end of a run of possibly-colliding keys.
          long item;
          for (int i = nextKeyIndex(d, len); (item = tab[i]) != 0;
               i = nextKeyIndex(i, len) ) {
              // The following test triggers if the item at slot i (which
              // hashes to be at slot r) should take the spot vacated by d.
              // If so, we swap it in, and then continue with d now at the
              // newly vacated i.  This process will terminate when we hit
              // the null slot at the end of this run.
              // The test is messy because we are using a circular table.
              int r = hash(item, len);
              if ((i < r && (r <= d || d <= i)) || (r <= d && d <= i)) {
                  tab[d] = item;
                  tab[d + 1] = tab[i + 1];
                  tab[i] = 0;
                  tab[i + 1] = 0;
                  d = i;
              }
          }
      }
  
      /**
       * Removes all of the mappings from this map.
       * The map will be empty after this call returns.
       */
      void clear() {
          modCount++;
          long[] tab = table;
          Arrays.fill(tab, 0);
          size = 0;
      }
  
      /**
       * Compares the specified object with this map for equality.  Returns
       * <tt>true</tt> if the given object is also a map and the two maps
       * represent identical object-reference mappings.  More formally, this
       * map is equal to another map <tt>m</tt> if and only if
       * <tt>this.entrySet().equals(m.entrySet())</tt>.
       *
       * <p><b>Owing to the reference-equality-based semantics of this map it is
       * possible that the symmetry and transitivity requirements of the
       * <tt>Object.equals</tt> contract may be violated if this map is compared
       * to a normal map.  However, the <tt>Object.equals</tt> contract is
       * guaranteed to hold among <tt>LongHashMap</tt> instances.</b>
       *
       * @param  o object to be compared for equality with this map
       * @return <tt>true</tt> if the specified object is equal to this map
       * @see Object#equals(Object)
       */
      @Override
      public boolean equals(Object o) {
          if (o == this) {
              return true;
          } else if (o instanceof LongHashMap) {
              LongHashMap m = (LongHashMap) o;
              if (m.size() != size)
                  return false;
  
              long[] tab = m.table;
              for (int i = 0; i < tab.length; i+=2) {
                  long k = tab[i];
                  if (k != 0 && !containsMapping(k, tab[i + 1]))
                      return false;
              }
              return true;
          } else if (o instanceof Map) {
  //            Map m = (Map)o;
              return false;
          } else {
              return false;  // o is not a Map
          }
      }
  
      /**
       * Returns the hash code value for this map.  The hash code of a map is
       * defined to be the sum of the hash codes of each entry in the map's
       * <tt>entrySet()</tt> view.  This ensures that <tt>m1.equals(m2)</tt>
       * implies that <tt>m1.hashCode()==m2.hashCode()</tt> for any two
       * <tt>IdentityHashMap</tt> instances <tt>m1</tt> and <tt>m2</tt>, as
       * required by the general contract of {@link Object#hashCode}.
       *
       * <p><b>Owing to the reference-equality-based semantics of the
       * <tt>Map.Entry</tt> instances in the set returned by this map's
       * <tt>entrySet</tt> method, it is possible that the contractual
       * requirement of <tt>Object.hashCode</tt> mentioned in the previous
       * paragraph will be violated if one of the two objects being compared is
       * an <tt>LongHashMap</tt> instance and the other is a normal map.</b>
       *
       * @return the hash code value for this map
       * @see Object#equals(Object)
       * @see #equals(Object)
       */
      @Override
      public int hashCode() {
          int result = 0;
          long[] tab = table;
          for (int i = 0; i < tab.length; i +=2) {
              long key = tab[i];
              if (key != 0) {
                  long k = key;
                  result += hash(k,tab.length) ^
                            hash(tab[i + 1],tab.length);
              }
          }
          return result;
      }
  
  
  }