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

Comparing jsr166/src/main/java/util/NavigableMap.java (file contents):
Revision 1.2 by dl, Tue Mar 8 17:52:02 2005 UTC vs.
Revision 1.3 by dl, Tue Mar 22 01:30:10 2005 UTC

# Line 57 | Line 57 | public interface NavigableMap<K,V> exten
57       * @throws NullPointerException if key is <tt>null</tt> and this map
58       * does not support <tt>null</tt> keys.
59       */
60 <    public Map.Entry<K,V> ceilingEntry(K key);
60 >    Map.Entry<K,V> ceilingEntry(K key);
61  
62      /**
63       * Returns least key greater than or equal to the given key, or
# Line 71 | Line 71 | public interface NavigableMap<K,V> exten
71       * @throws NullPointerException if key is <tt>null</tt> and this map
72       * does not support <tt>null</tt> keys.
73       */
74 <    public K ceilingKey(K key);
74 >    K ceilingKey(K key);
75  
76      /**
77       * Returns a key-value mapping associated with the greatest
# Line 86 | Line 86 | public interface NavigableMap<K,V> exten
86       * @throws NullPointerException if key is <tt>null</tt> and this map
87       * does not support <tt>null</tt> keys.
88       */
89 <    public Map.Entry<K,V> lowerEntry(K key);
89 >    Map.Entry<K,V> lowerEntry(K key);
90  
91      /**
92       * Returns the greatest key strictly less than the given key, or
# Line 100 | Line 100 | public interface NavigableMap<K,V> exten
100       * @throws NullPointerException if key is <tt>null</tt> and this map
101       * does not support <tt>null</tt> keys.
102       */
103 <    public K lowerKey(K key);
103 >    K lowerKey(K key);
104  
105      /**
106       * Returns a key-value mapping associated with the greatest key
# Line 115 | Line 115 | public interface NavigableMap<K,V> exten
115       * @throws NullPointerException if key is <tt>null</tt> and this map
116       * does not support <tt>null</tt> keys.
117       */
118 <    public Map.Entry<K,V> floorEntry(K key);
118 >    Map.Entry<K,V> floorEntry(K key);
119  
120      /**
121       * Returns the greatest key
# Line 130 | Line 130 | public interface NavigableMap<K,V> exten
130       * @throws NullPointerException if key is <tt>null</tt> and this map
131       * does not support <tt>null</tt> keys.
132       */
133 <    public K floorKey(K key);
133 >    K floorKey(K key);
134  
135      /**
136       * Returns a key-value mapping associated with the least key
# Line 145 | Line 145 | public interface NavigableMap<K,V> exten
145       * @throws NullPointerException if key is <tt>null</tt> and this map
146       * does not support <tt>null</tt> keys.
147       */
148 <    public Map.Entry<K,V> higherEntry(K key);
148 >    Map.Entry<K,V> higherEntry(K key);
149  
150      /**
151       * Returns the least key strictly greater than the given key, or
# Line 159 | Line 159 | public interface NavigableMap<K,V> exten
159       * @throws NullPointerException if key is <tt>null</tt> and this map
160       * does not support <tt>null</tt> keys.
161       */
162 <    public K higherKey(K key);
162 >    K higherKey(K key);
163  
164      /**
165       * Returns a key-value mapping associated with the least
# Line 168 | Line 168 | public interface NavigableMap<K,V> exten
168       * @return an Entry with least key, or <tt>null</tt>
169       * if the map is empty.
170       */
171 <    public Map.Entry<K,V> firstEntry();
171 >    Map.Entry<K,V> firstEntry();
172  
173      /**
174       * Returns a key-value mapping associated with the greatest
# Line 177 | Line 177 | public interface NavigableMap<K,V> exten
177       * @return an Entry with greatest key, or <tt>null</tt>
178       * if the map is empty.
179       */
180 <    public Map.Entry<K,V> lastEntry();
180 >    Map.Entry<K,V> lastEntry();
181  
182      /**
183       * Removes and returns a key-value mapping associated with
# Line 186 | Line 186 | public interface NavigableMap<K,V> exten
186       * @return the removed first entry of this map, or <tt>null</tt>
187       * if the map is empty.
188       */
189 <    public Map.Entry<K,V> pollFirstEntry();
189 >    Map.Entry<K,V> pollFirstEntry();
190  
191      /**
192       * Removes and returns a key-value mapping associated with
# Line 195 | Line 195 | public interface NavigableMap<K,V> exten
195       * @return the removed last entry of this map, or <tt>null</tt>
196       * if the map is empty.
197       */
198 <    public Map.Entry<K,V> pollLastEntry();
198 >    Map.Entry<K,V> pollLastEntry();
199  
200      /**
201       * Returns a set view of the keys contained in this map, in
# Line 237 | Line 237 | public interface NavigableMap<K,V> exten
237      /**
238       * Returns a view of the portion of this map whose keys range from
239       * <tt>fromKey</tt>, inclusive, to <tt>toKey</tt>, exclusive.  (If
240 <     * <tt>fromKey</tt> and <tt>toKey</tt> are equal, the returned sorted map
241 <     * is empty.)  The returned sorted map is backed by this map, so changes
242 <     * in the returned sorted map are reflected in this map, and vice-versa.
243 <
240 >     * <tt>fromKey</tt> and <tt>toKey</tt> are equal, the returned
241 >     * navigable map is empty.)  The returned navigable map is backed
242 >     * by this map, so changes in the returned navigable map are
243 >     * reflected in this map, and vice-versa. Note: This
244 >     * method differs from <tt>SortedMap.subMap</tt> only
245 >     * in that the returned map is guaranteed to support the
246 >     * <tt>NavigableMap</tt> interface.
247 >     *
248       * @param fromKey low endpoint (inclusive) of the subMap.
249       * @param toKey high endpoint (exclusive) of the subMap.
250       *
# Line 257 | Line 261 | public interface NavigableMap<K,V> exten
261       * <tt>toKey</tt> is <tt>null</tt> and this map does not support
262       * <tt>null</tt> keys.
263       */
264 <    public NavigableMap<K,V> subMap(K fromKey, K toKey);
264 >    NavigableMap<K,V> navigableSubMap(K fromKey, K toKey);
265  
266      /**
267       * Returns a view of the portion of this map whose keys are strictly less
268 <     * than <tt>toKey</tt>.  The returned sorted map is backed by this map, so
269 <     * changes in the returned sorted map are reflected in this map, and
268 >     * than <tt>toKey</tt>.  The returned navigable map is backed by this map, so
269 >     * changes in the returned navigable map are reflected in this map, and
270       * vice-versa.  
271       * @param toKey high endpoint (exclusive) of the headMap.
272       * @return a view of the portion of this map whose keys are strictly
# Line 274 | Line 278 | public interface NavigableMap<K,V> exten
278       * @throws NullPointerException if <tt>toKey</tt> is <tt>null</tt>
279       * and this map does not support <tt>null</tt> keys.
280       */
281 <    public NavigableMap<K,V> headMap(K toKey);
281 >    NavigableMap<K,V> navigableHeadMap(K toKey);
282  
283      /**
284       * Returns a view of the portion of this map whose keys are
285 <     * greater than or equal to <tt>fromKey</tt>.  The returned sorted
286 <     * map is backed by this map, so changes in the returned sorted
285 >     * greater than or equal to <tt>fromKey</tt>.  The returned navigable
286 >     * map is backed by this map, so changes in the returned navigable
287       * map are reflected in this map, and vice-versa.
288       * @param fromKey low endpoint (inclusive) of the tailMap.
289       * @return a view of the portion of this map whose keys are greater
# Line 290 | Line 294 | public interface NavigableMap<K,V> exten
294       * @throws NullPointerException if <tt>fromKey</tt> is <tt>null</tt>
295       * and this map does not support <tt>null</tt> keys.
296       */
297 <    public NavigableMap<K,V>  tailMap(K fromKey);
297 >    NavigableMap<K,V>  navigableTailMap(K fromKey);
298   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines