Merge pull request #623 from hugithordarson/orderings-sort-any-collection-2024-09-07
Change Orderings.orderedList() to accept a Collection rather than a List
diff --git a/cayenne/src/main/java/org/apache/cayenne/query/Orderings.java b/cayenne/src/main/java/org/apache/cayenne/query/Orderings.java
index b691612..c29592b 100644
--- a/cayenne/src/main/java/org/apache/cayenne/query/Orderings.java
+++ b/cayenne/src/main/java/org/apache/cayenne/query/Orderings.java
@@ -95,11 +95,11 @@
* Returns an list sorted with these Orderings.
*
* @param <T> the type of the list
- * @param list the list to sort
- * @return a sorted copy of the list
+ * @param objects elements to sort
+ * @return new List with ordered elements
*/
- public <T> List<T> orderedList(List<T> list) {
- return Ordering.orderedList(list, this);
+ public <T> List<T> orderedList(Collection<T> objects) {
+ return Ordering.orderedList(objects, this);
}
/**