StorageElemCompOnDistance.java 330 B

12345678910
  1. package classes.comparator;
  2. import classes.StorageElement;
  3. public class StorageElemCompOnDistance extends StorageElementComparator{
  4. @Override
  5. public int compare(StorageElement a, StorageElement b) {
  6. return Double.compare(a.getLowDistance()+a.getHighDistance(), b.getLowDistance() + b.getHighDistance());
  7. }
  8. }