summaryrefslogtreecommitdiff
path: root/java/util/Collections.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/util/Collections.java')
-rw-r--r--java/util/Collections.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/java/util/Collections.java b/java/util/Collections.java
index cd4a6fb40..c15fa092b 100644
--- a/java/util/Collections.java
+++ b/java/util/Collections.java
@@ -2068,10 +2068,11 @@ public class Collections
* sorts the array, and then iterates over the list setting each element from
* the array.
*
- * @param l the List to sort
+ * @param l the List to sort (<code>null</code> not permitted)
* @throws ClassCastException if some items are not mutually comparable
* @throws UnsupportedOperationException if the List is not modifiable
- * @throws NullPointerException if some element is null
+ * @throws NullPointerException if the list is <code>null</code>, or contains
+ * some element that is <code>null</code>.
* @see Arrays#sort(Object[])
*/
public static <T extends Comparable<? super T>> void sort(List<T> l)
@@ -2087,13 +2088,15 @@ public class Collections
* sorts the array, and then iterates over the list setting each element from
* the array.
*
- * @param l the List to sort
+ * @param l the List to sort (<code>null</code> not permitted)
* @param c the Comparator specifying the ordering for the elements, or
- * null for natural ordering
+ * <code>null</code> for natural ordering
* @throws ClassCastException if c will not compare some pair of items
* @throws UnsupportedOperationException if the List is not modifiable
- * @throws NullPointerException if null is compared by natural ordering
- * (only possible when c is null)
+ * @throws NullPointerException if the List is <code>null</code> or
+ * <code>null</code> is compared by natural ordering (only possible
+ * when c is <code>null</code>)
+ *
* @see Arrays#sort(Object[], Comparator)
*/
public static <T> void sort(List<T> l, Comparator<? super T> c)