[cvs] / jsr166 / src / main / java / util / NavigableMap.java Repository:
ViewVC logotype

Diff of /jsr166/src/main/java/util/NavigableMap.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8