Package org.eclipse.xtext.ide.util
Class DocumentHighlightComparator
- java.lang.Object
-
- org.eclipse.xtext.ide.util.DocumentHighlightComparator
-
- All Implemented Interfaces:
java.util.Comparator<org.eclipse.lsp4j.DocumentHighlight>
public class DocumentHighlightComparator extends java.lang.Object implements java.util.Comparator<org.eclipse.lsp4j.DocumentHighlight>Null-safe comparator fordocument highlightinstances.Compares
rangesfirst, then thehighlight kindsbased on the natural ordering.- See Also:
RangeComparator
-
-
Constructor Summary
Constructors Constructor Description DocumentHighlightComparator(RangeComparator rangeComparator)Creates a new document highlight comparator instance with the delegate comparator forranges.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(org.eclipse.lsp4j.DocumentHighlight left, org.eclipse.lsp4j.DocumentHighlight right)
-
-
-
Constructor Detail
-
DocumentHighlightComparator
@Inject public DocumentHighlightComparator(RangeComparator rangeComparator)
Creates a new document highlight comparator instance with the delegate comparator forranges.- Parameters:
rangeComparator- the comparator used for the ranges. Cannot benull.
-
-