public void add(T value) {
		// Do we have a completely empty tree?
		if (this.root == null) {
			this.root = new BTreeNode<T>(null, this.maxChildCount);
			this.root.addKey(value);
		} else {
			BTreeNode<T> node = this.root;
			while (node != null) {
				// Is the node a leaf?
				if (node.numberOfChildren() == 0) {
					node.addKey(value);
					if (node.numberOfKeys() <= this.maxKeyCount) {
						// We are done.
						break;
					}

					// We over-filled to node, split it!
					this.split(node);
					break;
				}

				// Internal node, navigate down!
				T lesser = node.getKey(0);
				if (value.compareTo(lesser) < 0) {
					// Leftmost child
					node = node.getChild(0);
					continue;
				}

				int size = node.numberOfKeys();
				int last = size - 1;
				T greater = node.getKey(last);
				if (value.compareTo(greater) > 0) {
					// Rightmost child
					node = node.getChild(size);
					continue;
				}

				for (int i = 1; i < size; i++) {
					T prev = node.getKey(i - 1);
					T next = node.getKey(i);
					if (value.compareTo(prev) > 0 && value.compareTo(next) < 0) {
						// Child between prev. and next
						node = node.getChild(i);
						break;
					}
				}
			}
		}

		this.size++;
	}