* method returns {@code v}; otherwise it returns {@code null}.
* (There can be at most one such mapping.)
*
- * A return value of {@code null} does not necessarily
+ *
A return value of {@code null} does not necessarily
* indicate that the map contains no mapping for the key; it's also
* possible that the map explicitly maps the key to {@code null}.
* The {@link #containsKey containsKey} operation may be used to
@@ -322,10 +323,10 @@ public class TreeMap
}
/**
- * Returns this map's entry for the given key, or null if the map
+ * Returns this map's entry for the given key, or {@code null} if the map
* does not contain an entry for the key.
*
- * @return this map's entry for the given key, or null if the map
+ * @return this map's entry for the given key, or {@code null} if the map
* does not contain an entry for the key
* @throws ClassCastException if the specified key cannot be compared
* with the keys currently in the map
@@ -381,7 +382,7 @@ public class TreeMap
* Gets the entry corresponding to the specified key; if no such entry
* exists, returns the entry for the least key greater than the specified
* key; if no such entry exists (i.e., the greatest key in the Tree is less
- * than the specified key), returns null.
+ * than the specified key), returns {@code null}.
*/
final Entry getCeilingEntry(K key) {
Entry p = root;
@@ -413,7 +414,7 @@ public class TreeMap
/**
* Gets the entry corresponding to the specified key; if no such entry
* exists, returns the entry for the greatest key less than the specified
- * key; if no such entry exists, returns null.
+ * key; if no such entry exists, returns {@code null}.
*/
final Entry getFloorEntry(K key) {
Entry p = root;
@@ -447,7 +448,7 @@ public class TreeMap
* Gets the entry for the least key greater than the specified
* key; if no such entry exists, returns the entry for the least
* key greater than the specified key; if no such entry exists
- * returns null.
+ * returns {@code null}.
*/
final Entry getHigherEntry(K key) {
Entry p = root;
@@ -478,7 +479,7 @@ public class TreeMap
/**
* Returns the entry for the greatest key less than the specified key; if
* no such entry exists (i.e., the least key in the Tree is greater than
- * the specified key), returns null.
+ * the specified key), returns {@code null}.
*/
final Entry getLowerEntry(K key) {
Entry p = root;
@@ -514,10 +515,10 @@ public class TreeMap
* @param key key with which the specified value is to be associated
* @param value value to be associated with the specified key
*
- * @return the previous value associated with key, or
- * null if there was no mapping for key.
- * (A null return can also indicate that the map
- * previously associated null with key.)
+ * @return the previous value associated with {@code key}, or
+ * {@code null} if there was no mapping for {@code key}.
+ * (A {@code null} return can also indicate that the map
+ * previously associated {@code null} with {@code key}.)
* @throws ClassCastException if the specified key cannot be compared
* with the keys currently in the map
* @throws NullPointerException if the specified key is null
@@ -583,10 +584,10 @@ public class TreeMap
* Removes the mapping for this key from this TreeMap if present.
*
* @param key key for which mapping should be removed
- * @return the previous value associated with key, or
- * null if there was no mapping for key.
- * (A null return can also indicate that the map
- * previously associated null with key.)
+ * @return the previous value associated with {@code key}, or
+ * {@code null} if there was no mapping for {@code key}.
+ * (A {@code null} return can also indicate that the map
+ * previously associated {@code null} with {@code key}.)
* @throws ClassCastException if the specified key cannot be compared
* with the keys currently in the map
* @throws NullPointerException if the specified key is null
@@ -614,7 +615,7 @@ public class TreeMap
}
/**
- * Returns a shallow copy of this TreeMap instance. (The keys and
+ * Returns a shallow copy of this {@code TreeMap} instance. (The keys and
* values themselves are not cloned.)
*
* @return a shallow copy of this map
@@ -788,12 +789,12 @@ public class TreeMap
* The set is backed by the map, so changes to the map are
* reflected in the set, and vice-versa. If the map is modified
* while an iteration over the set is in progress (except through
- * the iterator's own remove operation), the results of
+ * the iterator's own {@code remove} operation), the results of
* the iteration are undefined. The set supports element removal,
* which removes the corresponding mapping from the map, via the
- * Iterator.remove, Set.remove,
- * removeAll, retainAll, and clear
- * operations. It does not support the add or addAll
+ * {@code Iterator.remove}, {@code Set.remove},
+ * {@code removeAll}, {@code retainAll}, and {@code clear}
+ * operations. It does not support the {@code add} or {@code addAll}
* operations.
*/
public Set keySet() {
@@ -822,13 +823,13 @@ public class TreeMap
* The collection is backed by the map, so changes to the map are
* reflected in the collection, and vice-versa. If the map is
* modified while an iteration over the collection is in progress
- * (except through the iterator's own remove operation),
+ * (except through the iterator's own {@code remove} operation),
* the results of the iteration are undefined. The collection
* supports element removal, which removes the corresponding
- * mapping from the map, via the Iterator.remove,
- * Collection.remove, removeAll,
- * retainAll and clear operations. It does not
- * support the add or addAll operations.
+ * mapping from the map, via the {@code Iterator.remove},
+ * {@code Collection.remove}, {@code removeAll},
+ * {@code retainAll} and {@code clear} operations. It does not
+ * support the {@code add} or {@code addAll} operations.
*/
public Collection values() {
Collection vs = values;
@@ -841,14 +842,14 @@ public class TreeMap
* The set is backed by the map, so changes to the map are
* reflected in the set, and vice-versa. If the map is modified
* while an iteration over the set is in progress (except through
- * the iterator's own remove operation, or through the
- * setValue operation on a map entry returned by the
+ * the iterator's own {@code remove} operation, or through the
+ * {@code setValue} operation on a map entry returned by the
* iterator) the results of the iteration are undefined. The set
* supports element removal, which removes the corresponding
- * mapping from the map, via the Iterator.remove,
- * Set.remove, removeAll, retainAll and
- * clear operations. It does not support the
- * add or addAll operations.
+ * mapping from the map, via the {@code Iterator.remove},
+ * {@code Set.remove}, {@code removeAll}, {@code retainAll} and
+ * {@code clear} operations. It does not support the
+ * {@code add} or {@code addAll} operations.
*/
public Set> entrySet() {
EntrySet es = entrySet;
@@ -868,7 +869,7 @@ public class TreeMap
/**
* @throws ClassCastException {@inheritDoc}
- * @throws NullPointerException if fromKey or toKey is
+ * @throws NullPointerException if {@code fromKey} or {@code toKey} is
* null and this map uses natural ordering, or its comparator
* does not permit null keys
* @throws IllegalArgumentException {@inheritDoc}
@@ -883,7 +884,7 @@ public class TreeMap
/**
* @throws ClassCastException {@inheritDoc}
- * @throws NullPointerException if toKey is null
+ * @throws NullPointerException if {@code toKey} is null
* and this map uses natural ordering, or its comparator
* does not permit null keys
* @throws IllegalArgumentException {@inheritDoc}
@@ -897,7 +898,7 @@ public class TreeMap
/**
* @throws ClassCastException {@inheritDoc}
- * @throws NullPointerException if fromKey is null
+ * @throws NullPointerException if {@code fromKey} is null
* and this map uses natural ordering, or its comparator
* does not permit null keys
* @throws IllegalArgumentException {@inheritDoc}
@@ -911,7 +912,7 @@ public class TreeMap
/**
* @throws ClassCastException {@inheritDoc}
- * @throws NullPointerException if fromKey or toKey is
+ * @throws NullPointerException if {@code fromKey} or {@code toKey} is
* null and this map uses natural ordering, or its comparator
* does not permit null keys
* @throws IllegalArgumentException {@inheritDoc}
@@ -922,7 +923,7 @@ public class TreeMap
/**
* @throws ClassCastException {@inheritDoc}
- * @throws NullPointerException if toKey is null
+ * @throws NullPointerException if {@code toKey} is null
* and this map uses natural ordering, or its comparator
* does not permit null keys
* @throws IllegalArgumentException {@inheritDoc}
@@ -933,7 +934,7 @@ public class TreeMap
/**
* @throws ClassCastException {@inheritDoc}
- * @throws NullPointerException if fromKey is null
+ * @throws NullPointerException if {@code fromKey} is null
* and this map uses natural ordering, or its comparator
* does not permit null keys
* @throws IllegalArgumentException {@inheritDoc}
@@ -1193,7 +1194,7 @@ public class TreeMap
/**
* Test two values for equality. Differs from o1.equals(o2) only in
- * that it copes with null o1 properly.
+ * that it copes with {@code null} o1 properly.
*/
final static boolean valEquals(Object o1, Object o2) {
return (o1==null ? o2==null : o1.equals(o2));
@@ -1897,7 +1898,7 @@ public class TreeMap
/**
* Make a new cell with given key, value, and parent, and with
- * null child links, and BLACK color.
+ * {@code null} child links, and BLACK color.
*/
Entry(K key, V value, Entry parent) {
this.key = key;
@@ -2249,10 +2250,10 @@ public class TreeMap
private static final long serialVersionUID = 919286545866124006L;
/**
- * Save the state of the TreeMap instance to a stream (i.e.,
+ * Save the state of the {@code TreeMap} instance to a stream (i.e.,
* serialize it).
*
- * @serialData The size of the TreeMap (the number of key-value
+ * @serialData The size of the TreeMap (the number of key-value
* mappings) is emitted (int), followed by the key (Object)
* and value (Object) for each key-value mapping represented
* by the TreeMap. The key-value mappings are emitted in
@@ -2277,7 +2278,7 @@ public class TreeMap
}
/**
- * Reconstitute the TreeMap instance from a stream (i.e.,
+ * Reconstitute the {@code TreeMap} instance from a stream (i.e.,
* deserialize it).
*/
private void readObject(final java.io.ObjectInputStream s)