summaryrefslogtreecommitdiffstats
path: root/server/src
diff options
context:
space:
mode:
authorHenri Sara <hesara@vaadin.com>2016-11-30 15:44:10 +0200
committerVaadin Code Review <review@vaadin.com>2016-11-30 16:13:13 +0000
commit27107227ca3ac9806387659111f87db7f0b3348c (patch)
treedb0b6b002f048925bd03d62a8722867d5a77e308 /server/src
parent5e8ca8062e360bd84a8ef1d32f800833a0cbb8b9 (diff)
downloadvaadin-framework-27107227ca3ac9806387659111f87db7f0b3348c.tar.gz
vaadin-framework-27107227ca3ac9806387659111f87db7f0b3348c.zip
Fix ListDataProvider and SortOrder javadoc
Change-Id: I99895bd13ecbc34bc85409fcde02a65e9f9a2f13
Diffstat (limited to 'server/src')
-rw-r--r--server/src/main/java/com/vaadin/server/data/ListDataProvider.java13
-rw-r--r--server/src/main/java/com/vaadin/server/data/SortOrder.java3
2 files changed, 13 insertions, 3 deletions
diff --git a/server/src/main/java/com/vaadin/server/data/ListDataProvider.java b/server/src/main/java/com/vaadin/server/data/ListDataProvider.java
index b295f3375d..0f9e033bbb 100644
--- a/server/src/main/java/com/vaadin/server/data/ListDataProvider.java
+++ b/server/src/main/java/com/vaadin/server/data/ListDataProvider.java
@@ -40,8 +40,11 @@ public class ListDataProvider<T>
private final Collection<T> backend;
/**
- * Constructs a new ListDataProvider. This method makes a protective copy of
- * the contents of the Collection.
+ * Constructs a new ListDataProvider.
+ * <p>
+ * No protective copy is made of the list, and changes in the provided
+ * backing Collection will be visible via this data provider. The caller
+ * should copy the list if necessary.
*
* @param items
* the initial data, not null
@@ -56,6 +59,10 @@ public class ListDataProvider<T>
* Chaining constructor for making modified {@link ListDataProvider}s. This
* Constructor is used internally for making sorted and filtered variants of
* a base data provider with actual data.
+ * <p>
+ * No protective copy is made of the list, and changes in the provided
+ * backing Collection will be visible via this data provider. The caller
+ * should copy the list if necessary.
*
* @param items
* the backend data from the original list data provider
@@ -123,7 +130,7 @@ public class ListDataProvider<T>
* {@code sortingBy(Comparator.comparing(sortOrder))}.
*
* @param sortOrder
- * function to sort by
+ * function to sort by, not {@code null}
* @param <U>
* the type of the Comparable sort key
* @return new data provider with modified sorting
diff --git a/server/src/main/java/com/vaadin/server/data/SortOrder.java b/server/src/main/java/com/vaadin/server/data/SortOrder.java
index 03c846790d..d5ce197ccf 100644
--- a/server/src/main/java/com/vaadin/server/data/SortOrder.java
+++ b/server/src/main/java/com/vaadin/server/data/SortOrder.java
@@ -23,6 +23,9 @@ import com.vaadin.shared.data.sort.SortDirection;
* Sorting information for one field.
*
* @see Query
+ * @param <T>
+ * the type of the sorting information, usually a String (field id)
+ * or a {@link java.util.Comparator}.
*/
public class SortOrder<T> implements Serializable {