Java 7/8 implementations of K nearest neightbour (actually 1-nn)