--- jsr166/src/main/java/util/TreeMap.java 2005/06/24 00:26:57 1.21 +++ jsr166/src/main/java/util/TreeMap.java 2005/06/24 20:44:49 1.22 @@ -645,16 +645,25 @@ public class TreeMap // NavigableMap API methods + /** + * @since 1.6 + */ public Map.Entry firstEntry() { Entry e = getFirstEntry(); return (e == null)? null : new AbstractMap.SimpleImmutableEntry(e); } + /** + * @since 1.6 + */ public Map.Entry lastEntry() { Entry e = getLastEntry(); return (e == null)? null : new AbstractMap.SimpleImmutableEntry(e); } + /** + * @since 1.6 + */ public Map.Entry pollFirstEntry() { Entry p = getFirstEntry(); if (p == null) @@ -664,6 +673,9 @@ public class TreeMap return result; } + /** + * @since 1.6 + */ public Map.Entry pollLastEntry() { Entry p = getLastEntry(); if (p == null) @@ -678,6 +690,7 @@ public class TreeMap * @throws NullPointerException if the specified key is null * and this map uses natural ordering, or its comparator * does not permit null keys + * @since 1.6 */ public Map.Entry lowerEntry(K key) { Entry e = getLowerEntry(key); @@ -689,6 +702,7 @@ public class TreeMap * @throws NullPointerException if the specified key is null * and this map uses natural ordering, or its comparator * does not permit null keys + * @since 1.6 */ public K lowerKey(K key) { Entry e = getLowerEntry(key); @@ -700,6 +714,7 @@ public class TreeMap * @throws NullPointerException if the specified key is null * and this map uses natural ordering, or its comparator * does not permit null keys + * @since 1.6 */ public Map.Entry floorEntry(K key) { Entry e = getFloorEntry(key); @@ -711,6 +726,7 @@ public class TreeMap * @throws NullPointerException if the specified key is null * and this map uses natural ordering, or its comparator * does not permit null keys + * @since 1.6 */ public K floorKey(K key) { Entry e = getFloorEntry(key); @@ -722,6 +738,7 @@ public class TreeMap * @throws NullPointerException if the specified key is null * and this map uses natural ordering, or its comparator * does not permit null keys + * @since 1.6 */ public Map.Entry ceilingEntry(K key) { Entry e = getCeilingEntry(key); @@ -733,6 +750,7 @@ public class TreeMap * @throws NullPointerException if the specified key is null * and this map uses natural ordering, or its comparator * does not permit null keys + * @since 1.6 */ public K ceilingKey(K key) { Entry e = getCeilingEntry(key); @@ -744,6 +762,7 @@ public class TreeMap * @throws NullPointerException if the specified key is null * and this map uses natural ordering, or its comparator * does not permit null keys + * @since 1.6 */ public Map.Entry higherEntry(K key) { Entry e = getHigherEntry(key); @@ -755,6 +774,7 @@ public class TreeMap * @throws NullPointerException if the specified key is null * and this map uses natural ordering, or its comparator * does not permit null keys + * @since 1.6 */ public K higherKey(K key) { Entry e = getHigherEntry(key); @@ -922,6 +942,9 @@ public class TreeMap } } + /** + * @since 1.6 + */ public Set> descendingEntrySet() { Set> es = descendingEntrySet; return (es != null) ? es : (descendingEntrySet = new DescendingEntrySet()); @@ -933,6 +956,9 @@ public class TreeMap } } + /** + * @since 1.6 + */ public Set descendingKeySet() { Set ks = descendingKeySet; return (ks != null) ? ks : (descendingKeySet = new DescendingKeySet()); @@ -950,6 +976,7 @@ public class TreeMap * null and this map uses natural ordering, or its comparator * does not permit null keys * @throws IllegalArgumentException {@inheritDoc} + * @since 1.6 */ public NavigableMap navigableSubMap(K fromKey, K toKey) { return new SubMap(fromKey, toKey); @@ -961,6 +988,7 @@ public class TreeMap * and this map uses natural ordering, or its comparator * does not permit null keys * @throws IllegalArgumentException {@inheritDoc} + * @since 1.6 */ public NavigableMap navigableHeadMap(K toKey) { return new SubMap(toKey, true); @@ -972,6 +1000,7 @@ public class TreeMap * and this map uses natural ordering, or its comparator * does not permit null keys * @throws IllegalArgumentException {@inheritDoc} + * @since 1.6 */ public NavigableMap navigableTailMap(K fromKey) { return new SubMap(fromKey, false);