@Override
    public V add(String key, V value)
    {
        if (key == null || value == null || key.length() == 0)
        {
            throw new IllegalArgumentException();
        }
        char c = key.charAt(0);
        if (root == null)
        {
            root = new Node<V>(c);
        }
        Node<V> node = addNextHere(root, c);
        int length = key.length();
        for (int i = 1; i < length; ++i)
        {
            c = key.charAt(i);
            node = addNextNotHere(node, c);
        }
        V old = node.value;
        node.value = value;
        if (old == null)
        {
            ++size;
        }
        return old;
    }