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

javax.swing.DefaultListModel DOES NOT implements java.list.Vector

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 1.4.0
    • 1.3.0
    • client-libs
    • beta
    • generic
    • generic



      Name: skT45625 Date: 07/10/2000


      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)


      Although the javaDoc specifies that the javax.swing.DefaultListModel class
      implements the java.util.Vector API:
         "This class [javax.swing.DefaultListModel] implements
         the java.util.Vector API and notifies the ListDataListeners
         when changes occur."

      Assuming java.util.Vector implements java.util.List interface, I guess
      javax.swing.DefaultListModel should implement the java.util.List interface. But
      there are many methods missing:

         public boolean add(Object obj)
         public boolean remove(Object obj)
         public boolean containsAll(Collection col)
         public boolean addAll(Collection col)
         public boolean addAll(int index, Collection col)
         public boolean removeAll(Collection col)
         public boolean retainAll(Collection col)
         public Iterator iterator()
         public ListIterator listIterator()
         public ListIterator listIterator(int index)
         public List subList(int first, int last)
         public Object[] toArray(Object[] objArray)

      The bug is either in the javaDoc or in the code!
      (Review ID: 107017)
      ======================================================================

            svioletsunw Scott Violet (Inactive)
            skondamasunw Suresh Kondamareddy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: