--- jsr166/src/main/java/util/NavigableMap.java 2005/03/22 01:30:10 1.3 +++ jsr166/src/main/java/util/NavigableMap.java 2005/05/02 22:34:56 1.6 @@ -25,8 +25,12 @@ package java.util; * descendingEntrySet return descending views. The * performance of ascending traversals is likely to be faster than * descending traversals. Notice that it is possible to perform - * subrange traversals in either direction using SubMap. - * + * subrange traversals in either direction using navigableSubMap. + * Methods navigableSubMap, navigableHeadMap, and + * navigableTailMap differ from the similarly named + * SortedMap methods only in that the returned maps + * are guaranteed to obey the NavigableMap interface. + * *

This interface additionally defines methods firstEntry, * pollFirstEntry, lastEntry, and * pollLastEntry that return and/or remove the least and @@ -41,14 +45,15 @@ package java.util; * * @author Doug Lea * @param the type of keys maintained by this map - * @param the type of mapped values + * @param the type of mapped values + * @since 1.6 */ public interface NavigableMap extends SortedMap { /** * Returns a key-value mapping associated with the least key * greater than or equal to the given key, or null if there is - * no such entry. - * + * no such entry. + * * @param key the key. * @return an Entry associated with ceiling of given key, or null * if there is no such Entry. @@ -62,7 +67,7 @@ public interface NavigableMap exten /** * Returns least key greater than or equal to the given key, or * null if there is no such key. - * + * * @param key the key. * @return the ceiling key, or null * if there is no such key. @@ -76,8 +81,8 @@ public interface NavigableMap exten /** * Returns a key-value mapping associated with the greatest * key strictly less than the given key, or null if there is no - * such entry. - * + * such entry. + * * @param key the key. * @return an Entry with greatest key less than the given * key, or null if there is no such Entry. @@ -91,7 +96,7 @@ public interface NavigableMap exten /** * Returns the greatest key strictly less than the given key, or * null if there is no such key. - * + * * @param key the key. * @return the greatest key less than the given * key, or null if there is no such key. @@ -106,7 +111,7 @@ public interface NavigableMap exten * Returns a key-value mapping associated with the greatest key * less than or equal to the given key, or null if there * is no such entry. - * + * * @param key the key. * @return an Entry associated with floor of given key, or null * if there is no such Entry. @@ -121,7 +126,7 @@ public interface NavigableMap exten * Returns the greatest key * less than or equal to the given key, or null if there * is no such key. - * + * * @param key the key. * @return the floor of given key, or null if there is no * such key. @@ -136,7 +141,7 @@ public interface NavigableMap exten * Returns a key-value mapping associated with the least key * strictly greater than the given key, or null if there * is no such entry. - * + * * @param key the key. * @return an Entry with least key greater than the given key, or * null if there is no such Entry. @@ -150,7 +155,7 @@ public interface NavigableMap exten /** * Returns the least key strictly greater than the given key, or * null if there is no such key. - * + * * @param key the key. * @return the least key greater than the given key, or * null if there is no such key. @@ -164,8 +169,8 @@ public interface NavigableMap exten /** * Returns a key-value mapping associated with the least * key in this map, or null if the map is empty. - * - * @return an Entry with least key, or null + * + * @return an Entry with least key, or null * if the map is empty. */ Map.Entry firstEntry(); @@ -173,7 +178,7 @@ public interface NavigableMap exten /** * Returns a key-value mapping associated with the greatest * key in this map, or null if the map is empty. - * + * * @return an Entry with greatest key, or null * if the map is empty. */ @@ -182,7 +187,7 @@ public interface NavigableMap exten /** * Removes and returns a key-value mapping associated with * the least key in this map, or null if the map is empty. - * + * * @return the removed first entry of this map, or null * if the map is empty. */ @@ -191,7 +196,7 @@ public interface NavigableMap exten /** * Removes and returns a key-value mapping associated with * the greatest key in this map, or null if the map is empty. - * + * * @return the removed last entry of this map, or null * if the map is empty. */ @@ -240,10 +245,7 @@ public interface NavigableMap exten * 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. + * reflected in this map, and vice-versa. * * @param fromKey low endpoint (inclusive) of the subMap. * @param toKey high endpoint (exclusive) of the subMap. @@ -267,7 +269,7 @@ public interface NavigableMap exten * Returns a view of the portion of this map whose keys are strictly less * 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. + * vice-versa. * @param toKey high endpoint (exclusive) of the headMap. * @return a view of the portion of this map whose keys are strictly * less than toKey.