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

(coll) Collections.checkedQueue(Queue<T>,Class) is missing

XMLWordPrintable

    • b12
    • x86
    • windows_2000
    • Verified

      Name: rmT116609 Date: 04/08/2004


      A DESCRIPTION OF THE REQUEST :
      In JDK1.5 beta, in the package << java.util >> ; these methods were added, in the class java.util.Collections :

      - public static <E> Collection<E> checkedCollection(Collection<E> c, Class<E> type);
      - public static <E> SortedSet<E> checkedSortedSet(SortedSet<E> s,Class<E> type);
      - public static <E> List<E> checkedList(List<E> list,Class<E> type);
      - public static <K,V> Map<K,V> checkedMap(Map<K,V> m,Class<K> keyType,Class<V> valueType);
      - public static <K,V> SortedMap<K,V> checkedSortedMap(SortedMap<K,V> m,Class<K> keyType,Class<V> valueType)

      But this one is missing :
      - public static <E> Queue<E> checkedQueue(Queue<E> list,Class<E> type);
      java.util.Queue is a new interface for a collection.


      JUSTIFICATION :
        Justification : scalability ?

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -

      Queue<String> myCheckedQueue = Collections.checkedQueue( new PriorityQueue(), String.class );
      (Incident Review ID: 246800)
      ======================================================================

            dmocek Darryl Mocek
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: