Package spoon.support.comparator
Class CtLineElementComparator
java.lang.Object
spoon.support.comparator.CtLineElementComparator
- All Implemented Interfaces:
Serializable,Comparator<CtElement>
Comparator of compile-time elements. Elements are sorted by position in
source files.
- See Also:
- Serialized Form
-
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
-
CtLineElementComparator
public CtLineElementComparator()
-
-
Method Details
-
compare
Returns 0 if o1 has the same position as o2, or both positions are invalid and o1.equals(o2). Returns -1 if o1 is before o2 in the file, or o1 has no valid position or both positions are invalid !o1.equals(o2). Returns 1 if o2 is after o1 in the file, or o2 has no valid position.- Specified by:
comparein interfaceComparator<CtElement>
-