class ConcurrentTree extends ConcurrentTreeNode<K, V> {

	public synchronized void add(final K[] path, final V value) {
		ConcurrentTreeNode<K, V> node = this;
		for (final K part : path) {
			if (node.getChild(part) == null) {
				node.addChild(new ConcurrentTreeNode<K, V>(part, node));
			}
			node = node.getChild(part);
		}

		node.setValue(value);
	}

}