--- jsr166/src/main/java/util/NavigableMap.java 2005/03/08 17:52:02 1.2 +++ jsr166/src/main/java/util/NavigableMap.java 2005/03/22 01:30:10 1.3 @@ -57,7 +57,7 @@ public interface NavigableMap exten * @throws NullPointerException if key is null and this map * does not support null keys. */ - public Map.Entry ceilingEntry(K key); + Map.Entry ceilingEntry(K key); /** * Returns least key greater than or equal to the given key, or @@ -71,7 +71,7 @@ public interface NavigableMap exten * @throws NullPointerException if key is null and this map * does not support null keys. */ - public K ceilingKey(K key); + K ceilingKey(K key); /** * Returns a key-value mapping associated with the greatest @@ -86,7 +86,7 @@ public interface NavigableMap exten * @throws NullPointerException if key is null and this map * does not support null keys. */ - public Map.Entry lowerEntry(K key); + Map.Entry lowerEntry(K key); /** * Returns the greatest key strictly less than the given key, or @@ -100,7 +100,7 @@ public interface NavigableMap exten * @throws NullPointerException if key is null and this map * does not support null keys. */ - public K lowerKey(K key); + K lowerKey(K key); /** * Returns a key-value mapping associated with the greatest key @@ -115,7 +115,7 @@ public interface NavigableMap exten * @throws NullPointerException if key is null and this map * does not support null keys. */ - public Map.Entry floorEntry(K key); + Map.Entry floorEntry(K key); /** * Returns the greatest key @@ -130,7 +130,7 @@ public interface NavigableMap exten * @throws NullPointerException if key is null and this map * does not support null keys. */ - public K floorKey(K key); + K floorKey(K key); /** * Returns a key-value mapping associated with the least key @@ -145,7 +145,7 @@ public interface NavigableMap exten * @throws NullPointerException if key is null and this map * does not support null keys. */ - public Map.Entry higherEntry(K key); + Map.Entry higherEntry(K key); /** * Returns the least key strictly greater than the given key, or @@ -159,7 +159,7 @@ public interface NavigableMap exten * @throws NullPointerException if key is null and this map * does not support null keys. */ - public K higherKey(K key); + K higherKey(K key); /** * Returns a key-value mapping associated with the least @@ -168,7 +168,7 @@ public interface NavigableMap exten * @return an Entry with least key, or null * if the map is empty. */ - public Map.Entry firstEntry(); + Map.Entry firstEntry(); /** * Returns a key-value mapping associated with the greatest @@ -177,7 +177,7 @@ public interface NavigableMap exten * @return an Entry with greatest key, or null * if the map is empty. */ - public Map.Entry lastEntry(); + Map.Entry lastEntry(); /** * Removes and returns a key-value mapping associated with @@ -186,7 +186,7 @@ public interface NavigableMap exten * @return the removed first entry of this map, or null * if the map is empty. */ - public Map.Entry pollFirstEntry(); + Map.Entry pollFirstEntry(); /** * Removes and returns a key-value mapping associated with @@ -195,7 +195,7 @@ public interface NavigableMap exten * @return the removed last entry of this map, or null * if the map is empty. */ - public Map.Entry pollLastEntry(); + Map.Entry pollLastEntry(); /** * Returns a set view of the keys contained in this map, in @@ -237,10 +237,14 @@ public interface NavigableMap exten /** * Returns a view of the portion of this map whose keys range from * fromKey, inclusive, to toKey, exclusive. (If - * fromKey and toKey are equal, the returned sorted map - * is empty.) The returned sorted map is backed by this map, so changes - * in the returned sorted map are reflected in this map, and vice-versa. - + * fromKey and toKey are equal, the returned + * navigable map is empty.) The returned navigable map is backed + * by this map, so changes in the returned navigable map are + * reflected in this map, and vice-versa. Note: This + * method differs from SortedMap.subMap only + * in that the returned map is guaranteed to support the + * NavigableMap interface. + * * @param fromKey low endpoint (inclusive) of the subMap. * @param toKey high endpoint (exclusive) of the subMap. * @@ -257,12 +261,12 @@ public interface NavigableMap exten * toKey is null and this map does not support * null keys. */ - public NavigableMap subMap(K fromKey, K toKey); + NavigableMap navigableSubMap(K fromKey, K toKey); /** * Returns a view of the portion of this map whose keys are strictly less - * than toKey. The returned sorted map is backed by this map, so - * changes in the returned sorted map are reflected in this map, and + * than toKey. The returned navigable map is backed by this map, so + * changes in the returned navigable map are reflected in this map, and * vice-versa. * @param toKey high endpoint (exclusive) of the headMap. * @return a view of the portion of this map whose keys are strictly @@ -274,12 +278,12 @@ public interface NavigableMap exten * @throws NullPointerException if toKey is null * and this map does not support null keys. */ - public NavigableMap headMap(K toKey); + NavigableMap navigableHeadMap(K toKey); /** * Returns a view of the portion of this map whose keys are - * greater than or equal to fromKey. The returned sorted - * map is backed by this map, so changes in the returned sorted + * greater than or equal to fromKey. The returned navigable + * map is backed by this map, so changes in the returned navigable * map are reflected in this map, and vice-versa. * @param fromKey low endpoint (inclusive) of the tailMap. * @return a view of the portion of this map whose keys are greater @@ -290,5 +294,5 @@ public interface NavigableMap exten * @throws NullPointerException if fromKey is null * and this map does not support null keys. */ - public NavigableMap tailMap(K fromKey); + NavigableMap navigableTailMap(K fromKey); }