Class CoordinateComparator<X extends Point_>
java.lang.Object
Jcg.geometry.CoordinateComparator<X>
- All Implemented Interfaces:
Comparator<X>
Class allowing to compare two points according to a given coordinate
- Version:
- jan 2014
- Author:
- Luca Castelli Aleardi (Ecole Polytechnique, INF562)
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) intindicates which coordinates are to be compared:
0 stays for direction 'x'
1 stays for direction 'y'
and so on. -
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
-
Field Details
-
direction
int directionindicates which coordinates are to be compared:
0 stays for direction 'x'
1 stays for direction 'y'
and so on.
-
-
Constructor Details
-
CoordinateComparator
public CoordinateComparator(int dir)
-
-
Method Details
-
compare
-