Java implementation of an n-dimensional KD-tree