Class LexicographicalPointComparator
java.lang.Object
org.uma.jmetal.util.point.comparator.LexicographicalPointComparator
- All Implemented Interfaces:
Comparator<Point>
This class implements the Comparator interface for comparing two points.
The order used is lexicographical order.
- Author:
- Antonio J. Nebro, Juan J. Durillo
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
LexicographicalPointComparator
public LexicographicalPointComparator()
-
-
Method Details
-
compare
The compare method compare the objects o1 and o2.- Specified by:
comparein interfaceComparator<Point>- Parameters:
pointOne- An object that reference a double[]pointTwo- An object that reference a double[]- Returns:
- The following value: -1 if point1 invalid input: '<' point2, 1 if point1 > point2 or 0 in other case.
-