docs: private void checkDistanceFunction(SpatialPrimitiveDistanceFunction<? super O> distanceFunction) {
      if(!settings.distanceFunction.equals(distanceFunction)) {
        throw new IllegalArgumentException("Parameter distanceFunction must be an instance of " + this.distanceQuery.getClass() + ", but is " + distanceFunction.getClass());
      }
    }