org.psjava.ds.geometry.PointByXComparator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of psjava Show documentation
Show all versions of psjava Show documentation
Problem Solving Library for Java
package org.psjava.ds.geometry;
import java.util.Comparator;
public class PointByXComparator {
public static Comparator> create(final Comparator comaprator) {
return new Comparator>() {
@Override
public int compare(Point2D p1, Point2D p2) {
return comaprator.compare(p1.x(), p2.x());
}
};
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy