cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject [4/4] cayenne git commit: javadoc cleanup
Date Fri, 14 Apr 2017 08:08:29 GMT
javadoc cleanup


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/67c947e0
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/67c947e0
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/67c947e0

Branch: refs/heads/master
Commit: 67c947e0b8a702cab023032ae0a721d13ac7abbf
Parents: 6cb249b
Author: stariy <stariy95@gmail.com>
Authored: Fri Apr 14 11:08:07 2017 +0300
Committer: stariy <stariy95@gmail.com>
Committed: Fri Apr 14 11:08:07 2017 +0300

----------------------------------------------------------------------
 .../java/org/apache/cayenne/query/Ordering.java     | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/67c947e0/cayenne-server/src/main/java/org/apache/cayenne/query/Ordering.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/query/Ordering.java b/cayenne-server/src/main/java/org/apache/cayenne/query/Ordering.java
index 95c0b01..3625df6 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/query/Ordering.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/query/Ordering.java
@@ -59,6 +59,9 @@ public class Ordering implements Comparator<Object>, Serializable,
XMLSerializab
 	 * according the default iteration order of the Orderings list. I.e. each
 	 * Ordering with lower index is more significant than any other Ordering
 	 * with higher index. List being ordered is modified in place.
+	 *
+	 * @param objects elements to sort
+	 * @param orderings list of Orderings to be applied
 	 */
 	@SuppressWarnings("unchecked")
 	public static void orderList(List<?> objects, List<? extends Ordering> orderings)
{
@@ -66,10 +69,18 @@ public class Ordering implements Comparator<Object>, Serializable,
XMLSerializab
 	}
 
 	/**
-	 * Return the sorted list of objects.
+	 * Orders a given list of objects, using a List of Orderings applied
+	 * according the default iteration order of the Orderings list. I.e. each
+	 * Ordering with lower index is more significant than any other Ordering
+	 * with higher index.
+	 *
+	 * @param objects elements to sort
+	 * @param orderings list of Orderings to be applied
+	 * @return new List with ordered elements
+	 *
 	 * @since 4.0
 	 */
-	public static <E> List<E> orderedList(Collection<E> objects, List<?
extends Ordering> orderings) {
+	public static <E> List<E> orderedList(final Collection<E> objects, List<?
extends Ordering> orderings) {
 		List<E> newList = new ArrayList<>(objects);
 		
 		orderList(newList, orderings);
@@ -168,6 +179,7 @@ public class Ordering implements Comparator<Object>, Serializable,
XMLSerializab
 	/**
 	 * Sets sort order for whether nulls are at the top or bottom of the
 	 * resulting list. Default is true.
+	 * Affects only in-memory sorting.
 	 * 
 	 * @param nullSortedFirst
 	 *            true sorts nulls to the top of the list, false sorts nulls to


Mime
View raw message