added getNearest(final int ... ids)

Now you only have to use getNearest(1234); to get the nearest object