mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
revert convert to combinators in hot path
GitOrigin-RevId: cd404cb2bdb8bc6f596781a4ebc05a638c7e792b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c83ce9390f
commit
179777c45b
@@ -14,6 +14,10 @@ public interface Segment {
|
|||||||
@Contract(pure = true)
|
@Contract(pure = true)
|
||||||
int getEndOffset();
|
int getEndOffset();
|
||||||
|
|
||||||
Comparator<Segment> BY_START_OFFSET_THEN_END_OFFSET =
|
@SuppressWarnings("ComparatorCombinators")
|
||||||
Comparator.comparingInt(Segment::getStartOffset).thenComparingInt(Segment::getEndOffset);
|
Comparator<Segment> BY_START_OFFSET_THEN_END_OFFSET = (r1, r2) -> {
|
||||||
|
int result = r1.getStartOffset() - r2.getStartOffset();
|
||||||
|
if (result == 0) result = r1.getEndOffset() - r2.getEndOffset();
|
||||||
|
return result;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user