code: public V remove(Object key) {
          TreeMapEntry<K,V> p = getEntry(key);
          if (p == null)
              return null;
  
          V oldValue = p.value;
          deleteEntry(p);
          return oldValue;
      }
docs: Removes the mapping for this key from this TreeMap if present.
  
  @param  key key for which mapping should be removed
  @return the previous value associated with {@code key}, or
  {@code null} if there was no mapping for {@code key}.
  (A {@code null} return can also indicate that the map
  previously associated {@code null} with {@code key}.)
  @throws ClassCastException if the specified key cannot be compared
  with the keys currently in the map
  @throws NullPointerException if the specified key is null
  and this map uses natural ordering, or its comparator
  does not permit null keys