code: @Override
      public int compare(DistanceResult o1, DistanceResult o2)
      {
          Double o1Distance = o1.getDistance();
          Double o2Distance = o2.getDistance();
  
          int distanceResult = o1Distance.compareTo(o2Distance);
          if (distanceResult != 0)
          {
              return distanceResult;
          }
  
          return o1.getDataId().compareTo(o2.getDataId());
      }
docs: {@inheritDoc}