Skip to content

Commit d3b0c0e

Browse files
committed
forgot one ObservableListDistinctChanges method
1 parent b31be11 commit d3b0c0e

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

src/main/java/rx/observables/JavaFxObservable.java

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,19 @@ public static <T> Observable<ListChange<T>> fromObservableListDistinctChanges(fi
179179
return ObservableListSource.fromObservableListDistinctChanges(source);
180180
}
181181
/**
182-
* Emits distinctly added and removed mappings of each item from an ObservableList.
183-
* If dupe mapped items with identical hashcode/equals evaluations are added to an ObservableList, only the first one will fire an ADDED item.
184-
* When the last dupe is removed, only then will it fire a REMOVED item.
182+
* Emits distinctly added and removed T items from an ObservableList based on a mapping to an R value.
183+
* If dupe mapped R items with identical hashcode/equals evaluations are added to an ObservableList, only the first one will fire an ADDED T item.
184+
* When the last R dupe is removed, only then will it fire a REMOVED T item.
185+
* @param source
186+
* @return An Observable emitting changed items with an ADDED, REMOVED, or UPDATED flags
187+
*/
188+
public static <T,R> Observable<ListChange<T>> fromObservableListDistinctChanges(final ObservableList<T> source, Func1<T,R> mapper) {
189+
return ObservableListSource.fromObservableListDistinctChanges(source,mapper);
190+
}
191+
/**
192+
* Emits distinctly added and removed mappings to each R item from an ObservableList.
193+
* If dupe mapped R items with identical hashcode/equals evaluations are added to an ObservableList, only the first one will fire an ADDED R item.
194+
* When the last dupe is removed, only then will it fire a REMOVED R item.
185195
* @param source
186196
* @return An Observable emitting changed mapped items with an ADDED, REMOVED, or UPDATED flags
187197
*/

0 commit comments

Comments
 (0)