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

AbstractList should override remove(Object) of AbstractCollection to use indexOf

XMLWordPrintable

      A DESCRIPTION OF THE PROBLEM :
      In current versions of the JDK, AbstractCollection#remove(Object) uses an iterator to locate the Object in O(n) time. Because AbstractList does not override this method, it does the same.
      List implementations may provide a List#indexOf(Object) method which performs better, possibly even reduce time complexity below O(n).
      Consequently, AbstractList should override #remove(Object) of AbstractCollection to use List#indexOf(Object) to locate the object with possibly better performance.


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: