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.46 by jsr166, Sun May 18 23:59:57 2008 UTC vs.
Revision 1.47 by jsr166, Thu Mar 26 19:07:33 2009 UTC

# Line 1068 | Line 1068 | public class TreeMap<K,V>
1068          }
1069          public NavigableSet<E> subSet(E fromElement, boolean fromInclusive,
1070                                        E toElement,   boolean toInclusive) {
1071 <            return new TreeSet<E>(m.subMap(fromElement, fromInclusive,
1072 <                                           toElement,   toInclusive));
1071 >            return new KeySet<E>(m.subMap(fromElement, fromInclusive,
1072 >                                          toElement,   toInclusive));
1073          }
1074          public NavigableSet<E> headSet(E toElement, boolean inclusive) {
1075 <            return new TreeSet<E>(m.headMap(toElement, inclusive));
1075 >            return new KeySet<E>(m.headMap(toElement, inclusive));
1076          }
1077          public NavigableSet<E> tailSet(E fromElement, boolean inclusive) {
1078 <            return new TreeSet<E>(m.tailMap(fromElement, inclusive));
1078 >            return new KeySet<E>(m.tailMap(fromElement, inclusive));
1079          }
1080          public SortedSet<E> subSet(E fromElement, E toElement) {
1081              return subSet(fromElement, true, toElement, false);
# Line 1087 | Line 1087 | public class TreeMap<K,V>
1087              return tailSet(fromElement, true);
1088          }
1089          public NavigableSet<E> descendingSet() {
1090 <            return new TreeSet(m.descendingMap());
1090 >            return new KeySet(m.descendingMap());
1091          }
1092      }
1093  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines