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

ObservableList API Generics

    XMLWordPrintable

Details

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

    Description

      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?

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Imported: