Avoid Iterator allocations when calling Sort.isSorted().

Closes #2445
This commit is contained in:
Mark Paluch
2021-09-07 16:07:24 +02:00
parent c0d85aabc5
commit 242a71ca56
2 changed files with 14 additions and 0 deletions

View File

@@ -104,6 +104,11 @@ public class QSort extends Sort implements Serializable {
return Order.by(targetElement.toString()).with(orderSpecifier.isAscending() ? Direction.ASC : Direction.DESC);
}
@Override
public boolean isEmpty() {
return orderSpecifiers.isEmpty();
}
/**
* @return the orderSpecifier
*/