ObservableList API Question

Bruce Alspaugh alspaughb at gmail.com
Tue Sep 25 10:36:59 PDT 2012


If you look at the API for List, you will see the following methods
accept plain Objects, or collections of plain Objects:

List#remove(Object o)
List#removeAll(Collection<?> c);
List#retainAll(Collection<?> c);
List#indexOf(Object o)
List#contains(Object o);
List#containsAll(Collection<?> c);

So why does ObservableList only accept generic E's in the following
methods?

ObservableList#removeAll(E... elements)
ObservableList#retainAll(E... elements)

Also, why is there no corresponding ObservableList#containsAll(Object...
elements) method?

Bruce






More information about the openjfx-dev mailing list