Package org.eclipse.xtext.ide.util
Class PositionComparator
java.lang.Object
org.eclipse.xtext.ide.util.PositionComparator
- All Implemented Interfaces:
Comparator<org.eclipse.lsp4j.Position>
Null-safe comparator for
position
instances.
Compares lines
first, then
character offsets
.
- Author:
- akos.kitta - Initial contribution and API
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compare
(org.eclipse.lsp4j.Position left, org.eclipse.lsp4j.Position right) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
PositionComparator
public PositionComparator()Sole constructor. Creates a new comparator forposition
instances.
-
-
Method Details
-
compare
public int compare(org.eclipse.lsp4j.Position left, org.eclipse.lsp4j.Position right) - Specified by:
compare
in interfaceComparator<org.eclipse.lsp4j.Position>
-