docs: @Override
      public V put(String key, V value) {
          // Keys can not be null
          if (key == null) {
              throw new NullPointerException("Key can not be null");
          }
  
          // Empty keys are stored in the root
          if (key.equals("")) {
              PatriciaNode<V> node = new PatriciaNode<>(key, value, -1);
              node.setValue(value);
              root.setRight(node);
              entries++;
              return value;
          }
  
          // Find nearest node
          PatriciaNode<V> nearest = findNearestNode(key);
  
          // Key already exist, replace value and return
          if (key.equals(nearest.getKey())) {
              nearest.setValue(value);
              return value;
          }
  
          // Find differing bit and create new node to insert
          int bit = findFirstDifferingBit(key, nearest.getKey());
          PatriciaNode<V> node = new PatriciaNode<>(key, value, bit);
  
          // Insert new node
          insertNode(node);
  
          entries++;
  
          return value;
      }