Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8090529

ObservableList API Generics

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 7u6
    • javafx

      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?

            Unassigned Unassigned
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Imported: