@@ -102,22 +102,24 @@ public static <E> ObservableList<E> observableList(List<E> list) {
102
102
}
103
103
104
104
/**
105
- * Constructs an ObservableList that is backed by the specified list.
106
- * Mutation operations on the ObservableList instance will be reported
107
- * to observers that have registered on that instance.<br>
108
- * Note that mutation operations made directly to the underlying list are
109
- * <em>not</em> reported to observers of any ObservableList that
105
+ * Constructs an {@code ObservableList} that is backed by the specified list and listens to changes in observables of its items.
106
+ * Mutation operations made directly to the underlying list are
107
+ * <em>not</em> reported to observers of any {@code ObservableList} that
110
108
* wraps it.
111
- * <br>
112
- * This list also reports mutations of the elements in it by using <code>extractor</code>.
113
- * Observable objects returned by extractor (applied to each list element) are listened for changes
114
- * and transformed into "update" change of ListChangeListener.
109
+ * <p>
110
+ * The {@code extractor} returns observables (usually properties) of the objects in the created list. These observables are
111
+ * listened for changes, and the user is notified of these through an
112
+ * {@linkplain ListChangeListener.Change#wasUpdated() update} change of an attached {@code ListChangeListener}. These changes
113
+ * are unrelated to the changes made to the observable list itself using methods such as {@code add} and {@code remove}.
114
+ * <p>
115
+ * For example, a list of {@code Shape}s can listen to changes in the shapes' {@code fill} property.
115
116
*
116
- * @param <E> The type of List to be wrapped
117
- * @param list a concrete List that backs this ObservableList
118
- * @param extractor element to Observable[] convertor
117
+ * @param <E> The type of {@code List} to be wrapped
118
+ * @param list a concrete {@code List} that backs this {@code ObservableList}
119
+ * @param extractor element to {@code Observable[]} converter
120
+ * @return a newly created {@code ObservableList}
121
+ * @see #observableArrayList(javafx.util.Callback)
119
122
* @since JavaFX 2.1
120
- * @return a newly created ObservableList
121
123
*/
122
124
public static <E > ObservableList <E > observableList (List <E > list , Callback <E , Observable []> extractor ) {
123
125
if (list == null || extractor == null ) {
@@ -307,7 +309,7 @@ public static ObservableFloatArray observableFloatArray(ObservableFloatArray arr
307
309
}
308
310
309
311
/**
310
- * Creates a new empty observable list that is backed by an arraylist .
312
+ * Creates a new empty observable list that is backed by an array list .
311
313
* @see #observableList(java.util.List)
312
314
* @param <E> The type of List to be wrapped
313
315
* @return a newly created ObservableList
@@ -318,14 +320,20 @@ public static <E> ObservableList<E> observableArrayList() {
318
320
}
319
321
320
322
/**
321
- * Creates a new empty observable list backed by an arraylist.
323
+ * Creates a new empty {@code ObservableList} that is backed by an array list and listens to changes in observables of its items.
324
+ * <p>
325
+ * The {@code extractor} returns observables (usually properties) of the objects in the created list. These observables are
326
+ * listened for changes and the user is notified of these through an
327
+ * {@linkplain ListChangeListener.Change#wasUpdated() update} change of an attached {@code ListChangeListener}. These changes
328
+ * are unrelated to the changes made to the observable list itself using methods such as {@code add} and {@code remove}.
329
+ * <p>
330
+ * For example, a list of {@code Shape}s can listen to changes in the shapes' {@code fill} property.
322
331
*
323
- * This list reports element updates.
324
- * @param <E> The type of List to be wrapped
325
- * @param extractor element to Observable[] convertor. Observable objects are listened for changes on the element.
332
+ * @param <E> The type of {@code List} to be wrapped
333
+ * @param extractor element to {@code Observable[]} converter
334
+ * @return a newly created {@code ObservableList}
326
335
* @see #observableList(java.util.List, javafx.util.Callback)
327
336
* @since JavaFX 2.1
328
- * @return a newly created ObservableList
329
337
*/
330
338
public static <E > ObservableList <E > observableArrayList (Callback <E , Observable []> extractor ) {
331
339
return observableList (new ArrayList (), extractor );
@@ -369,7 +377,7 @@ public static <K,V> ObservableMap<K,V> observableHashMap() {
369
377
370
378
/**
371
379
* Concatenates more observable lists into one. The resulting list
372
- * would be backed by an arraylist .
380
+ * would be backed by an array list .
373
381
* @param <E> The type of List to be wrapped
374
382
* @param lists lists to concatenate
375
383
* @return new observable array list concatenated from the arguments
0 commit comments