APL/DEV 3.2/TP08/Tri/RealComparator.java

12 lines
252 B
Java
Raw Normal View History

2023-03-07 16:14:57 +01:00
public class RealComparator implements TreeComparator<Float> {
public RealComparator() {}
@Override
public int compare(Float a, Float b) {
if (a > b) return 1;
else if (a < b) return -1;
else return 0;
}
}