ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/TreeSet.java
(Generate patch)

Comparing jsr166/src/main/java/util/TreeSet.java (file contents):
Revision 1.8 by jsr166, Mon May 2 18:38:53 2005 UTC vs.
Revision 1.10 by jsr166, Tue May 3 02:52:07 2005 UTC

# Line 53 | Line 53 | package java.util;
53   * throw <tt>ConcurrentModificationException</tt> on a best-effort basis.
54   * Therefore, it would be wrong to write a program that depended on this
55   * exception for its correctness:   <i>the fail-fast behavior of iterators
56 < * should be used only to detect bugs.</i><p>
56 > * should be used only to detect bugs.</i>
57   *
58 < * This class is a member of the
58 > * <p>This class is a member of the
59   * <a href="{@docRoot}/../guide/collections/index.html">
60   * Java Collections Framework</a>.
61   *
# Line 265 | Line 265 | public class TreeSet<E>
265          if (m.size()==0 && c.size() > 0 &&
266              c instanceof SortedSet &&
267              m instanceof TreeMap) {
268 <            SortedSet<Map.Entry<E, Object>> set = (SortedSet<Map.Entry<E, Object>>) (SortedSet) c;
268 >            SortedSet<? extends E> set = (SortedSet<? extends E>) c;
269              TreeMap<E,Object> map = (TreeMap<E, Object>) m;
270 <            Comparator<? super E> cc = (Comparator<E>) set.comparator();
270 >            Comparator<? super E> cc = (Comparator<? super E>) set.comparator();
271              Comparator<? super E> mc = map.comparator();
272              if (cc==mc || (cc != null && cc.equals(mc))) {
273                  map.addAllForTreeSet(set, PRESENT);
# Line 652 | Line 652 | public class TreeSet<E>
652          s.defaultReadObject();
653  
654          // Read in Comparator
655 <        Comparator<E> c = (Comparator<E>) s.readObject();
655 >        Comparator<? super E> c = (Comparator<? super E>) s.readObject();
656  
657          // Create backing TreeMap
658          TreeMap<E,Object> tm;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines