APL/DEV 3.2/TP05/Fusion/DoubleSorter.java

12 lines
250 B
Java
Raw Normal View History

2022-11-17 16:20:15 +01:00
import java.util.Comparator;
public class DoubleSorter implements Comparator<Double> {
@Override
public int compare(Double o1, Double o2) {
if (o1 > o2) return 1;
else if (o1 == o2) return 0;
else return -1;
}
}