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

Comparing jsr166/src/main/java/util/TreeMap.java (file contents):
Revision 1.41 by jsr166, Sun Jan 7 07:38:27 2007 UTC vs.
Revision 1.42 by jsr166, Tue Jan 30 03:54:29 2007 UTC

# Line 1209 | Line 1209 | public class TreeMap<K,V>
1209      // SubMaps
1210  
1211      /**
1212 +     * Dummy value serving as unmatchable fence key for unbounded
1213 +     * SubMapIterators
1214 +     */
1215 +    private static final Object UNBOUNDED = new Object();
1216 +
1217 +    /**
1218       * @serial include
1219       */
1220      static abstract class NavigableSubMap<K,V> extends AbstractMap<K,V>
# Line 1547 | Line 1553 | public class TreeMap<K,V>
1553          abstract class SubMapIterator<T> implements Iterator<T> {
1554              TreeMap.Entry<K,V> lastReturned;
1555              TreeMap.Entry<K,V> next;
1556 <            final K fenceKey;
1556 >            final Object fenceKey;
1557              int expectedModCount;
1558  
1559              SubMapIterator(TreeMap.Entry<K,V> first,
# Line 1555 | Line 1561 | public class TreeMap<K,V>
1561                  expectedModCount = m.modCount;
1562                  lastReturned = null;
1563                  next = first;
1564 <                fenceKey = fence == null ? null : fence.key;
1564 >                fenceKey = fence == null ? UNBOUNDED : fence.key;
1565              }
1566  
1567              public final boolean hasNext() {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines