提交 359c9339 编写于 作者: A avstepan

8133188: docs: replace <tt> tags (obsolete in html5) for java.util

Reviewed-by: martin
上级 247f158d
......@@ -26,23 +26,23 @@
package java.util;
/**
* This class provides a skeletal implementation of the <tt>Collection</tt>
* This class provides a skeletal implementation of the {@code Collection}
* interface, to minimize the effort required to implement this interface. <p>
*
* To implement an unmodifiable collection, the programmer needs only to
* extend this class and provide implementations for the <tt>iterator</tt> and
* <tt>size</tt> methods. (The iterator returned by the <tt>iterator</tt>
* method must implement <tt>hasNext</tt> and <tt>next</tt>.)<p>
* extend this class and provide implementations for the {@code iterator} and
* {@code size} methods. (The iterator returned by the {@code iterator}
* method must implement {@code hasNext} and {@code next}.)<p>
*
* To implement a modifiable collection, the programmer must additionally
* override this class's <tt>add</tt> method (which otherwise throws an
* <tt>UnsupportedOperationException</tt>), and the iterator returned by the
* <tt>iterator</tt> method must additionally implement its <tt>remove</tt>
* override this class's {@code add} method (which otherwise throws an
* {@code UnsupportedOperationException}), and the iterator returned by the
* {@code iterator} method must additionally implement its {@code remove}
* method.<p>
*
* The programmer should generally provide a void (no argument) and
* <tt>Collection</tt> constructor, as per the recommendation in the
* <tt>Collection</tt> interface specification.<p>
* {@code Collection} constructor, as per the recommendation in the
* {@code Collection} interface specification.<p>
*
* The documentation for each non-abstract method in this class describes its
* implementation in detail. Each of these methods may be overridden if
......@@ -81,7 +81,7 @@ public abstract class AbstractCollection<E> implements Collection<E> {
* {@inheritDoc}
*
* @implSpec
* This implementation returns <tt>size() == 0</tt>.
* This implementation returns {@code size() == 0}.
*/
public boolean isEmpty() {
return size() == 0;
......@@ -255,7 +255,7 @@ public abstract class AbstractCollection<E> implements Collection<E> {
*
* @implSpec
* This implementation always throws an
* <tt>UnsupportedOperationException</tt>.
* {@code UnsupportedOperationException}.
*
* @throws UnsupportedOperationException {@inheritDoc}
* @throws ClassCastException {@inheritDoc}
......@@ -276,8 +276,8 @@ public abstract class AbstractCollection<E> implements Collection<E> {
* from the collection using the iterator's remove method.
*
* <p>Note that this implementation throws an
* <tt>UnsupportedOperationException</tt> if the iterator returned by this
* collection's iterator method does not implement the <tt>remove</tt>
* {@code UnsupportedOperationException} if the iterator returned by this
* collection's iterator method does not implement the {@code remove}
* method and this collection contains the specified object.
*
* @throws UnsupportedOperationException {@inheritDoc}
......@@ -314,7 +314,7 @@ public abstract class AbstractCollection<E> implements Collection<E> {
* This implementation iterates over the specified collection,
* checking each element returned by the iterator in turn to see
* if it's contained in this collection. If all elements are so
* contained <tt>true</tt> is returned, otherwise <tt>false</tt>.
* contained {@code true} is returned, otherwise {@code false}.
*
* @throws ClassCastException {@inheritDoc}
* @throws NullPointerException {@inheritDoc}
......@@ -335,7 +335,7 @@ public abstract class AbstractCollection<E> implements Collection<E> {
* each object returned by the iterator to this collection, in turn.
*
* <p>Note that this implementation will throw an
* <tt>UnsupportedOperationException</tt> unless <tt>add</tt> is
* {@code UnsupportedOperationException} unless {@code add} is
* overridden (assuming the specified collection is non-empty).
*
* @throws UnsupportedOperationException {@inheritDoc}
......@@ -361,11 +361,11 @@ public abstract class AbstractCollection<E> implements Collection<E> {
* This implementation iterates over this collection, checking each
* element returned by the iterator in turn to see if it's contained
* in the specified collection. If it's so contained, it's removed from
* this collection with the iterator's <tt>remove</tt> method.
* this collection with the iterator's {@code remove} method.
*
* <p>Note that this implementation will throw an
* <tt>UnsupportedOperationException</tt> if the iterator returned by the
* <tt>iterator</tt> method does not implement the <tt>remove</tt> method
* {@code UnsupportedOperationException} if the iterator returned by the
* {@code iterator} method does not implement the {@code remove} method
* and this collection contains one or more elements in common with the
* specified collection.
*
......@@ -396,11 +396,11 @@ public abstract class AbstractCollection<E> implements Collection<E> {
* This implementation iterates over this collection, checking each
* element returned by the iterator in turn to see if it's contained
* in the specified collection. If it's not so contained, it's removed
* from this collection with the iterator's <tt>remove</tt> method.
* from this collection with the iterator's {@code remove} method.
*
* <p>Note that this implementation will throw an
* <tt>UnsupportedOperationException</tt> if the iterator returned by the
* <tt>iterator</tt> method does not implement the <tt>remove</tt> method
* {@code UnsupportedOperationException} if the iterator returned by the
* {@code iterator} method does not implement the {@code remove} method
* and this collection contains one or more elements not present in the
* specified collection.
*
......@@ -429,14 +429,14 @@ public abstract class AbstractCollection<E> implements Collection<E> {
*
* @implSpec
* This implementation iterates over this collection, removing each
* element using the <tt>Iterator.remove</tt> operation. Most
* element using the {@code Iterator.remove} operation. Most
* implementations will probably choose to override this method for
* efficiency.
*
* <p>Note that this implementation will throw an
* <tt>UnsupportedOperationException</tt> if the iterator returned by this
* collection's <tt>iterator</tt> method does not implement the
* <tt>remove</tt> method and this collection is non-empty.
* {@code UnsupportedOperationException} if the iterator returned by this
* collection's {@code iterator} method does not implement the
* {@code remove} method and this collection is non-empty.
*
* @throws UnsupportedOperationException {@inheritDoc}
*/
......@@ -455,8 +455,8 @@ public abstract class AbstractCollection<E> implements Collection<E> {
* Returns a string representation of this collection. The string
* representation consists of a list of the collection's elements in the
* order they are returned by its iterator, enclosed in square brackets
* (<tt>"[]"</tt>). Adjacent elements are separated by the characters
* <tt>", "</tt> (comma and space). Elements are converted to strings as
* ({@code "[]"}). Adjacent elements are separated by the characters
* {@code ", "} (comma and space). Elements are converted to strings as
* by {@link String#valueOf(Object)}.
*
* @return a string representation of this collection
......
......@@ -27,24 +27,24 @@ package java.util;
import java.util.Map.Entry;
/**
* This class provides a skeletal implementation of the <tt>Map</tt>
* This class provides a skeletal implementation of the {@code Map}
* interface, to minimize the effort required to implement this interface.
*
* <p>To implement an unmodifiable map, the programmer needs only to extend this
* class and provide an implementation for the <tt>entrySet</tt> method, which
* class and provide an implementation for the {@code entrySet} method, which
* returns a set-view of the map's mappings. Typically, the returned set
* will, in turn, be implemented atop <tt>AbstractSet</tt>. This set should
* not support the <tt>add</tt> or <tt>remove</tt> methods, and its iterator
* should not support the <tt>remove</tt> method.
* will, in turn, be implemented atop {@code AbstractSet}. This set should
* not support the {@code add} or {@code remove} methods, and its iterator
* should not support the {@code remove} method.
*
* <p>To implement a modifiable map, the programmer must additionally override
* this class's <tt>put</tt> method (which otherwise throws an
* <tt>UnsupportedOperationException</tt>), and the iterator returned by
* <tt>entrySet().iterator()</tt> must additionally implement its
* <tt>remove</tt> method.
* this class's {@code put} method (which otherwise throws an
* {@code UnsupportedOperationException}), and the iterator returned by
* {@code entrySet().iterator()} must additionally implement its
* {@code remove} method.
*
* <p>The programmer should generally provide a void (no argument) and map
* constructor, as per the recommendation in the <tt>Map</tt> interface
* constructor, as per the recommendation in the {@code Map} interface
* specification.
*
* <p>The documentation for each non-abstract method in this class describes its
......@@ -79,7 +79,7 @@ public abstract class AbstractMap<K,V> implements Map<K,V> {
* {@inheritDoc}
*
* @implSpec
* This implementation returns <tt>entrySet().size()</tt>.
* This implementation returns {@code entrySet().size()}.
*/
public int size() {
return entrySet().size();
......@@ -89,7 +89,7 @@ public abstract class AbstractMap<K,V> implements Map<K,V> {
* {@inheritDoc}
*
* @implSpec
* This implementation returns <tt>size() == 0</tt>.
* This implementation returns {@code size() == 0}.
*/
public boolean isEmpty() {
return size() == 0;
......@@ -99,10 +99,10 @@ public abstract class AbstractMap<K,V> implements Map<K,V> {
* {@inheritDoc}
*
* @implSpec
* This implementation iterates over <tt>entrySet()</tt> searching
* This implementation iterates over {@code entrySet()} searching
* for an entry with the specified value. If such an entry is found,
* <tt>true</tt> is returned. If the iteration terminates without
* finding such an entry, <tt>false</tt> is returned. Note that this
* {@code true} is returned. If the iteration terminates without
* finding such an entry, {@code false} is returned. Note that this
* implementation requires linear time in the size of the map.
*
* @throws ClassCastException {@inheritDoc}
......@@ -130,10 +130,10 @@ public abstract class AbstractMap<K,V> implements Map<K,V> {
* {@inheritDoc}
*
* @implSpec
* This implementation iterates over <tt>entrySet()</tt> searching
* This implementation iterates over {@code entrySet()} searching
* for an entry with the specified key. If such an entry is found,
* <tt>true</tt> is returned. If the iteration terminates without
* finding such an entry, <tt>false</tt> is returned. Note that this
* {@code true} is returned. If the iteration terminates without
* finding such an entry, {@code false} is returned. Note that this
* implementation requires linear time in the size of the map; many
* implementations will override this method.
*
......@@ -162,10 +162,10 @@ public abstract class AbstractMap<K,V> implements Map<K,V> {
* {@inheritDoc}
*
* @implSpec
* This implementation iterates over <tt>entrySet()</tt> searching
* This implementation iterates over {@code entrySet()} searching
* for an entry with the specified key. If such an entry is found,
* the entry's value is returned. If the iteration terminates without
* finding such an entry, <tt>null</tt> is returned. Note that this
* finding such an entry, {@code null} is returned. Note that this
* implementation requires linear time in the size of the map; many
* implementations will override this method.
*
......@@ -198,7 +198,7 @@ public abstract class AbstractMap<K,V> implements Map<K,V> {
*
* @implSpec
* This implementation always throws an
* <tt>UnsupportedOperationException</tt>.
* {@code UnsupportedOperationException}.
*
* @throws UnsupportedOperationException {@inheritDoc}
* @throws ClassCastException {@inheritDoc}
......@@ -213,18 +213,18 @@ public abstract class AbstractMap<K,V> implements Map<K,V> {
* {@inheritDoc}
*
* @implSpec
* This implementation iterates over <tt>entrySet()</tt> searching for an
* This implementation iterates over {@code entrySet()} searching for an
* entry with the specified key. If such an entry is found, its value is
* obtained with its <tt>getValue</tt> operation, the entry is removed
* obtained with its {@code getValue} operation, the entry is removed
* from the collection (and the backing map) with the iterator's
* <tt>remove</tt> operation, and the saved value is returned. If the
* iteration terminates without finding such an entry, <tt>null</tt> is
* {@code remove} operation, and the saved value is returned. If the
* iteration terminates without finding such an entry, {@code null} is
* returned. Note that this implementation requires linear time in the
* size of the map; many implementations will override this method.
*
* <p>Note that this implementation throws an
* <tt>UnsupportedOperationException</tt> if the <tt>entrySet</tt>
* iterator does not support the <tt>remove</tt> method and this map
* {@code UnsupportedOperationException} if the {@code entrySet}
* iterator does not support the {@code remove} method and this map
* contains a mapping for the specified key.
*
* @throws UnsupportedOperationException {@inheritDoc}
......@@ -264,12 +264,12 @@ public abstract class AbstractMap<K,V> implements Map<K,V> {
*
* @implSpec
* This implementation iterates over the specified map's
* <tt>entrySet()</tt> collection, and calls this map's <tt>put</tt>
* {@code entrySet()} collection, and calls this map's {@code put}
* operation once for each entry returned by the iteration.
*
* <p>Note that this implementation throws an
* <tt>UnsupportedOperationException</tt> if this map does not support
* the <tt>put</tt> operation and the specified map is nonempty.
* {@code UnsupportedOperationException} if this map does not support
* the {@code put} operation and the specified map is nonempty.
*
* @throws UnsupportedOperationException {@inheritDoc}
* @throws ClassCastException {@inheritDoc}
......@@ -285,11 +285,11 @@ public abstract class AbstractMap<K,V> implements Map<K,V> {
* {@inheritDoc}
*
* @implSpec
* This implementation calls <tt>entrySet().clear()</tt>.
* This implementation calls {@code entrySet().clear()}.
*
* <p>Note that this implementation throws an
* <tt>UnsupportedOperationException</tt> if the <tt>entrySet</tt>
* does not support the <tt>clear</tt> operation.
* {@code UnsupportedOperationException} if the {@code entrySet}
* does not support the {@code clear} operation.
*
* @throws UnsupportedOperationException {@inheritDoc}
*/
......@@ -314,10 +314,10 @@ public abstract class AbstractMap<K,V> implements Map<K,V> {
* @implSpec
* This implementation returns a set that subclasses {@link AbstractSet}.
* The subclass's iterator method returns a "wrapper object" over this
* map's <tt>entrySet()</tt> iterator. The <tt>size</tt> method
* delegates to this map's <tt>size</tt> method and the
* <tt>contains</tt> method delegates to this map's
* <tt>containsKey</tt> method.
* map's {@code entrySet()} iterator. The {@code size} method
* delegates to this map's {@code size} method and the
* {@code contains} method delegates to this map's
* {@code containsKey} method.
*
* <p>The set is created the first time this method is called,
* and returned in response to all subsequent calls. No synchronization
......@@ -371,10 +371,10 @@ public abstract class AbstractMap<K,V> implements Map<K,V> {
* @implSpec
* This implementation returns a collection that subclasses {@link
* AbstractCollection}. The subclass's iterator method returns a
* "wrapper object" over this map's <tt>entrySet()</tt> iterator.
* The <tt>size</tt> method delegates to this map's <tt>size</tt>
* method and the <tt>contains</tt> method delegates to this map's
* <tt>containsValue</tt> method.
* "wrapper object" over this map's {@code entrySet()} iterator.
* The {@code size} method delegates to this map's {@code size}
* method and the {@code contains} method delegates to this map's
* {@code containsValue} method.
*
* <p>The collection is created the first time this method is called, and
* returned in response to all subsequent calls. No synchronization is
......@@ -429,25 +429,25 @@ public abstract class AbstractMap<K,V> implements Map<K,V> {
/**
* Compares the specified object with this map for equality. Returns
* <tt>true</tt> if the given object is also a map and the two maps
* represent the same mappings. More formally, two maps <tt>m1</tt> and
* <tt>m2</tt> represent the same mappings if
* <tt>m1.entrySet().equals(m2.entrySet())</tt>. This ensures that the
* <tt>equals</tt> method works properly across different implementations
* of the <tt>Map</tt> interface.
* {@code true} if the given object is also a map and the two maps
* represent the same mappings. More formally, two maps {@code m1} and
* {@code m2} represent the same mappings if
* {@code m1.entrySet().equals(m2.entrySet())}. This ensures that the
* {@code equals} method works properly across different implementations
* of the {@code Map} interface.
*
* @implSpec
* This implementation first checks if the specified object is this map;
* if so it returns <tt>true</tt>. Then, it checks if the specified
* if so it returns {@code true}. Then, it checks if the specified
* object is a map whose size is identical to the size of this map; if
* not, it returns <tt>false</tt>. If so, it iterates over this map's
* <tt>entrySet</tt> collection, and checks that the specified map
* not, it returns {@code false}. If so, it iterates over this map's
* {@code entrySet} collection, and checks that the specified map
* contains each mapping that this map contains. If the specified map
* fails to contain such a mapping, <tt>false</tt> is returned. If the
* iteration completes, <tt>true</tt> is returned.
* fails to contain such a mapping, {@code false} is returned. If the
* iteration completes, {@code true} is returned.
*
* @param o object to be compared for equality with this map
* @return <tt>true</tt> if the specified object is equal to this map
* @return {@code true} if the specified object is equal to this map
*/
public boolean equals(Object o) {
if (o == this)
......@@ -483,13 +483,13 @@ public abstract class AbstractMap<K,V> implements Map<K,V> {
/**
* Returns the hash code value for this map. The hash code of a map is
* defined to be the sum of the hash codes of each entry in the map's
* <tt>entrySet()</tt> view. This ensures that <tt>m1.equals(m2)</tt>
* implies that <tt>m1.hashCode()==m2.hashCode()</tt> for any two maps
* <tt>m1</tt> and <tt>m2</tt>, as required by the general contract of
* {@code entrySet()} view. This ensures that {@code m1.equals(m2)}
* implies that {@code m1.hashCode()==m2.hashCode()} for any two maps
* {@code m1} and {@code m2}, as required by the general contract of
* {@link Object#hashCode}.
*
* @implSpec
* This implementation iterates over <tt>entrySet()</tt>, calling
* This implementation iterates over {@code entrySet()}, calling
* {@link Map.Entry#hashCode hashCode()} on each element (entry) in the
* set, and adding up the results.
*
......@@ -508,10 +508,10 @@ public abstract class AbstractMap<K,V> implements Map<K,V> {
/**
* Returns a string representation of this map. The string representation
* consists of a list of key-value mappings in the order returned by the
* map's <tt>entrySet</tt> view's iterator, enclosed in braces
* (<tt>"{}"</tt>). Adjacent mappings are separated by the characters
* <tt>", "</tt> (comma and space). Each key-value mapping is rendered as
* the key followed by an equals sign (<tt>"="</tt>) followed by the
* map's {@code entrySet} view's iterator, enclosed in braces
* ({@code "{}"}). Adjacent mappings are separated by the characters
* {@code ", "} (comma and space). Each key-value mapping is rendered as
* the key followed by an equals sign ({@code "="}) followed by the
* associated value. Keys and values are converted to strings as by
* {@link String#valueOf(Object)}.
*
......@@ -538,7 +538,7 @@ public abstract class AbstractMap<K,V> implements Map<K,V> {
}
/**
* Returns a shallow copy of this <tt>AbstractMap</tt> instance: the keys
* Returns a shallow copy of this {@code AbstractMap} instance: the keys
* and values themselves are not cloned.
*
* @return a shallow copy of this map
......@@ -570,11 +570,11 @@ public abstract class AbstractMap<K,V> implements Map<K,V> {
/**
* An Entry maintaining a key and a value. The value may be
* changed using the <tt>setValue</tt> method. This class
* changed using the {@code setValue} method. This class
* facilitates the process of building custom map
* implementations. For example, it may be convenient to return
* arrays of <tt>SimpleEntry</tt> instances in method
* <tt>Map.entrySet().toArray</tt>.
* arrays of {@code SimpleEntry} instances in method
* {@code Map.entrySet().toArray}.
*
* @since 1.6
*/
......@@ -689,7 +689,7 @@ public abstract class AbstractMap<K,V> implements Map<K,V> {
/**
* Returns a String representation of this map entry. This
* implementation returns the string representation of this
* entry's key followed by the equals character ("<tt>=</tt>")
* entry's key followed by the equals character ("{@code =}")
* followed by the string representation of this entry's value.
*
* @return a String representation of this map entry
......@@ -702,7 +702,7 @@ public abstract class AbstractMap<K,V> implements Map<K,V> {
/**
* An Entry maintaining an immutable key and value. This class
* does not support method <tt>setValue</tt>. This class may be
* does not support method {@code setValue}. This class may be
* convenient in methods that return thread-safe snapshots of
* key-value mappings.
*
......@@ -760,7 +760,7 @@ public abstract class AbstractMap<K,V> implements Map<K,V> {
/**
* Replaces the value corresponding to this entry with the specified
* value (optional operation). This implementation simply throws
* <tt>UnsupportedOperationException</tt>, as this class implements
* {@code UnsupportedOperationException}, as this class implements
* an <i>immutable</i> map entry.
*
* @param value new value to be stored in this entry
......@@ -820,7 +820,7 @@ public abstract class AbstractMap<K,V> implements Map<K,V> {
/**
* Returns a String representation of this map entry. This
* implementation returns the string representation of this
* entry's key followed by the equals character ("<tt>=</tt>")
* entry's key followed by the equals character ("{@code =}")
* followed by the string representation of this entry's value.
*
* @return a String representation of this map entry
......
......@@ -26,31 +26,31 @@
package java.util;
/**
* This class provides a skeletal implementation of the <tt>List</tt>
* This class provides a skeletal implementation of the {@code List}
* interface to minimize the effort required to implement this interface
* backed by a "sequential access" data store (such as a linked list). For
* random access data (such as an array), <tt>AbstractList</tt> should be used
* random access data (such as an array), {@code AbstractList} should be used
* in preference to this class.<p>
*
* This class is the opposite of the <tt>AbstractList</tt> class in the sense
* that it implements the "random access" methods (<tt>get(int index)</tt>,
* <tt>set(int index, E element)</tt>, <tt>add(int index, E element)</tt> and
* <tt>remove(int index)</tt>) on top of the list's list iterator, instead of
* This class is the opposite of the {@code AbstractList} class in the sense
* that it implements the "random access" methods ({@code get(int index)},
* {@code set(int index, E element)}, {@code add(int index, E element)} and
* {@code remove(int index)}) on top of the list's list iterator, instead of
* the other way around.<p>
*
* To implement a list the programmer needs only to extend this class and
* provide implementations for the <tt>listIterator</tt> and <tt>size</tt>
* provide implementations for the {@code listIterator} and {@code size}
* methods. For an unmodifiable list, the programmer need only implement the
* list iterator's <tt>hasNext</tt>, <tt>next</tt>, <tt>hasPrevious</tt>,
* <tt>previous</tt> and <tt>index</tt> methods.<p>
* list iterator's {@code hasNext}, {@code next}, {@code hasPrevious},
* {@code previous} and {@code index} methods.<p>
*
* For a modifiable list the programmer should additionally implement the list
* iterator's <tt>set</tt> method. For a variable-size list the programmer
* should additionally implement the list iterator's <tt>remove</tt> and
* <tt>add</tt> methods.<p>
* iterator's {@code set} method. For a variable-size list the programmer
* should additionally implement the list iterator's {@code remove} and
* {@code add} methods.<p>
*
* The programmer should generally provide a void (no argument) and collection
* constructor, as per the recommendation in the <tt>Collection</tt> interface
* constructor, as per the recommendation in the {@code Collection} interface
* specification.<p>
*
* This class is a member of the
......@@ -78,8 +78,8 @@ public abstract class AbstractSequentialList<E> extends AbstractList<E> {
* Returns the element at the specified position in this list.
*
* <p>This implementation first gets a list iterator pointing to the
* indexed element (with <tt>listIterator(index)</tt>). Then, it gets
* the element using <tt>ListIterator.next</tt> and returns it.
* indexed element (with {@code listIterator(index)}). Then, it gets
* the element using {@code ListIterator.next} and returns it.
*
* @throws IndexOutOfBoundsException {@inheritDoc}
*/
......@@ -96,13 +96,13 @@ public abstract class AbstractSequentialList<E> extends AbstractList<E> {
* specified element (optional operation).
*
* <p>This implementation first gets a list iterator pointing to the
* indexed element (with <tt>listIterator(index)</tt>). Then, it gets
* the current element using <tt>ListIterator.next</tt> and replaces it
* with <tt>ListIterator.set</tt>.
* indexed element (with {@code listIterator(index)}). Then, it gets
* the current element using {@code ListIterator.next} and replaces it
* with {@code ListIterator.set}.
*
* <p>Note that this implementation will throw an
* <tt>UnsupportedOperationException</tt> if the list iterator does not
* implement the <tt>set</tt> operation.
* {@code UnsupportedOperationException} if the list iterator does not
* implement the {@code set} operation.
*
* @throws UnsupportedOperationException {@inheritDoc}
* @throws ClassCastException {@inheritDoc}
......@@ -128,12 +128,12 @@ public abstract class AbstractSequentialList<E> extends AbstractList<E> {
* indices).
*
* <p>This implementation first gets a list iterator pointing to the
* indexed element (with <tt>listIterator(index)</tt>). Then, it
* inserts the specified element with <tt>ListIterator.add</tt>.
* indexed element (with {@code listIterator(index)}). Then, it
* inserts the specified element with {@code ListIterator.add}.
*
* <p>Note that this implementation will throw an
* <tt>UnsupportedOperationException</tt> if the list iterator does not
* implement the <tt>add</tt> operation.
* {@code UnsupportedOperationException} if the list iterator does not
* implement the {@code add} operation.
*
* @throws UnsupportedOperationException {@inheritDoc}
* @throws ClassCastException {@inheritDoc}
......@@ -156,12 +156,12 @@ public abstract class AbstractSequentialList<E> extends AbstractList<E> {
* list.
*
* <p>This implementation first gets a list iterator pointing to the
* indexed element (with <tt>listIterator(index)</tt>). Then, it removes
* the element with <tt>ListIterator.remove</tt>.
* indexed element (with {@code listIterator(index)}). Then, it removes
* the element with {@code ListIterator.remove}.
*
* <p>Note that this implementation will throw an
* <tt>UnsupportedOperationException</tt> if the list iterator does not
* implement the <tt>remove</tt> operation.
* {@code UnsupportedOperationException} if the list iterator does not
* implement the {@code remove} operation.
*
* @throws UnsupportedOperationException {@inheritDoc}
* @throws IndexOutOfBoundsException {@inheritDoc}
......@@ -193,14 +193,14 @@ public abstract class AbstractSequentialList<E> extends AbstractList<E> {
*
* <p>This implementation gets an iterator over the specified collection and
* a list iterator over this list pointing to the indexed element (with
* <tt>listIterator(index)</tt>). Then, it iterates over the specified
* {@code listIterator(index)}). Then, it iterates over the specified
* collection, inserting the elements obtained from the iterator into this
* list, one at a time, using <tt>ListIterator.add</tt> followed by
* <tt>ListIterator.next</tt> (to skip over the added element).
* list, one at a time, using {@code ListIterator.add} followed by
* {@code ListIterator.next} (to skip over the added element).
*
* <p>Note that this implementation will throw an
* <tt>UnsupportedOperationException</tt> if the list iterator returned by
* the <tt>listIterator</tt> method does not implement the <tt>add</tt>
* {@code UnsupportedOperationException} if the list iterator returned by
* the {@code listIterator} method does not implement the {@code add}
* operation.
*
* @throws UnsupportedOperationException {@inheritDoc}
......@@ -243,7 +243,7 @@ public abstract class AbstractSequentialList<E> extends AbstractList<E> {
* sequence).
*
* @param index index of first element to be returned from the list
* iterator (by a call to the <code>next</code> method)
* iterator (by a call to the {@code next} method)
* @return a list iterator over the elements in this list (in proper
* sequence)
* @throws IndexOutOfBoundsException {@inheritDoc}
......
......@@ -26,20 +26,20 @@
package java.util;
/**
* This class provides a skeletal implementation of the <tt>Set</tt>
* This class provides a skeletal implementation of the {@code Set}
* interface to minimize the effort required to implement this
* interface. <p>
*
* The process of implementing a set by extending this class is identical
* to that of implementing a Collection by extending AbstractCollection,
* except that all of the methods and constructors in subclasses of this
* class must obey the additional constraints imposed by the <tt>Set</tt>
* class must obey the additional constraints imposed by the {@code Set}
* interface (for instance, the add method must not permit addition of
* multiple instances of an object to a set).<p>
*
* Note that this class does not override any of the implementations from
* the <tt>AbstractCollection</tt> class. It merely adds implementations
* for <tt>equals</tt> and <tt>hashCode</tt>.<p>
* the {@code AbstractCollection} class. It merely adds implementations
* for {@code equals} and {@code hashCode}.<p>
*
* This class is a member of the
* <a href="{@docRoot}/../technotes/guides/collections/index.html">
......@@ -67,20 +67,20 @@ public abstract class AbstractSet<E> extends AbstractCollection<E> implements Se
/**
* Compares the specified object with this set for equality. Returns
* <tt>true</tt> if the given object is also a set, the two sets have
* {@code true} if the given object is also a set, the two sets have
* the same size, and every member of the given set is contained in
* this set. This ensures that the <tt>equals</tt> method works
* properly across different implementations of the <tt>Set</tt>
* this set. This ensures that the {@code equals} method works
* properly across different implementations of the {@code Set}
* interface.<p>
*
* This implementation first checks if the specified object is this
* set; if so it returns <tt>true</tt>. Then, it checks if the
* set; if so it returns {@code true}. Then, it checks if the
* specified object is a set whose size is identical to the size of
* this set; if not, it returns false. If so, it returns
* <tt>containsAll((Collection) o)</tt>.
* {@code containsAll((Collection) o)}.
*
* @param o object to be compared for equality with this set
* @return <tt>true</tt> if the specified object is equal to this set
* @return {@code true} if the specified object is equal to this set
*/
public boolean equals(Object o) {
if (o == this)
......@@ -103,14 +103,14 @@ public abstract class AbstractSet<E> extends AbstractCollection<E> implements Se
/**
* Returns the hash code value for this set. The hash code of a set is
* defined to be the sum of the hash codes of the elements in the set,
* where the hash code of a <tt>null</tt> element is defined to be zero.
* This ensures that <tt>s1.equals(s2)</tt> implies that
* <tt>s1.hashCode()==s2.hashCode()</tt> for any two sets <tt>s1</tt>
* and <tt>s2</tt>, as required by the general contract of
* where the hash code of a {@code null} element is defined to be zero.
* This ensures that {@code s1.equals(s2)} implies that
* {@code s1.hashCode()==s2.hashCode()} for any two sets {@code s1}
* and {@code s2}, as required by the general contract of
* {@link Object#hashCode}.
*
* <p>This implementation iterates over the set, calling the
* <tt>hashCode</tt> method on each element in the set, and adding up
* {@code hashCode} method on each element in the set, and adding up
* the results.
*
* @return the hash code value for this set
......@@ -136,24 +136,24 @@ public abstract class AbstractSet<E> extends AbstractCollection<E> implements Se
* the two sets.
*
* <p>This implementation determines which is the smaller of this set
* and the specified collection, by invoking the <tt>size</tt>
* and the specified collection, by invoking the {@code size}
* method on each. If this set has fewer elements, then the
* implementation iterates over this set, checking each element
* returned by the iterator in turn to see if it is contained in
* the specified collection. If it is so contained, it is removed
* from this set with the iterator's <tt>remove</tt> method. If
* from this set with the iterator's {@code remove} method. If
* the specified collection has fewer elements, then the
* implementation iterates over the specified collection, removing
* from this set each element returned by the iterator, using this
* set's <tt>remove</tt> method.
* set's {@code remove} method.
*
* <p>Note that this implementation will throw an
* <tt>UnsupportedOperationException</tt> if the iterator returned by the
* <tt>iterator</tt> method does not implement the <tt>remove</tt> method.
* {@code UnsupportedOperationException} if the iterator returned by the
* {@code iterator} method does not implement the {@code remove} method.
*
* @param c collection containing elements to be removed from this set
* @return <tt>true</tt> if this set changed as a result of the call
* @throws UnsupportedOperationException if the <tt>removeAll</tt> operation
* @return {@code true} if this set changed as a result of the call
* @throws UnsupportedOperationException if the {@code removeAll} operation
* is not supported by this set
* @throws ClassCastException if the class of an element of this set
* is incompatible with the specified collection
......
......@@ -294,7 +294,7 @@ public class ArrayList<E> extends AbstractList<E>
* Returns {@code true} if this list contains the specified element.
* More formally, returns {@code true} if and only if this list contains
* at least one element {@code e} such that
* <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>.
* {@code Objects.equals(o, e)}.
*
* @param o element whose presence in this list is to be tested
* @return {@code true} if this list contains the specified element
......@@ -307,7 +307,7 @@ public class ArrayList<E> extends AbstractList<E>
* Returns the index of the first occurrence of the specified element
* in this list, or -1 if this list does not contain the element.
* More formally, returns the lowest index {@code i} such that
* <tt>(o==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp;o.equals(get(i)))</tt>,
* {@code Objects.equals(o, get(i))},
* or -1 if there is no such index.
*/
public int indexOf(Object o) {
......@@ -327,7 +327,7 @@ public class ArrayList<E> extends AbstractList<E>
* Returns the index of the last occurrence of the specified element
* in this list, or -1 if this list does not contain the element.
* More formally, returns the highest index {@code i} such that
* <tt>(o==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp;o.equals(get(i)))</tt>,
* {@code Objects.equals(o, get(i))},
* or -1 if there is no such index.
*/
public int lastIndexOf(Object o) {
......@@ -511,7 +511,7 @@ public class ArrayList<E> extends AbstractList<E>
* if it is present. If the list does not contain the element, it is
* unchanged. More formally, removes the element with the lowest index
* {@code i} such that
* <tt>(o==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp;o.equals(get(i)))</tt>
* {@code Objects.equals(o, get(i))}
* (if such an element exists). Returns {@code true} if this list
* contained the specified element (or equivalently, if this list
* changed as a result of the call).
......
......@@ -35,30 +35,30 @@ import java.util.stream.StreamSupport;
* collections allow duplicate elements and others do not. Some are ordered
* and others unordered. The JDK does not provide any <i>direct</i>
* implementations of this interface: it provides implementations of more
* specific subinterfaces like <tt>Set</tt> and <tt>List</tt>. This interface
* specific subinterfaces like {@code Set} and {@code List}. This interface
* is typically used to pass collections around and manipulate them where
* maximum generality is desired.
*
* <p><i>Bags</i> or <i>multisets</i> (unordered collections that may contain
* duplicate elements) should implement this interface directly.
*
* <p>All general-purpose <tt>Collection</tt> implementation classes (which
* typically implement <tt>Collection</tt> indirectly through one of its
* <p>All general-purpose {@code Collection} implementation classes (which
* typically implement {@code Collection} indirectly through one of its
* subinterfaces) should provide two "standard" constructors: a void (no
* arguments) constructor, which creates an empty collection, and a
* constructor with a single argument of type <tt>Collection</tt>, which
* constructor with a single argument of type {@code Collection}, which
* creates a new collection with the same elements as its argument. In
* effect, the latter constructor allows the user to copy any collection,
* producing an equivalent collection of the desired implementation type.
* There is no way to enforce this convention (as interfaces cannot contain
* constructors) but all of the general-purpose <tt>Collection</tt>
* constructors) but all of the general-purpose {@code Collection}
* implementations in the Java platform libraries comply.
*
* <p>The "destructive" methods contained in this interface, that is, the
* methods that modify the collection on which they operate, are specified to
* throw <tt>UnsupportedOperationException</tt> if this collection does not
* throw {@code UnsupportedOperationException} if this collection does not
* support the operation. If this is the case, these methods may, but are not
* required to, throw an <tt>UnsupportedOperationException</tt> if the
* required to, throw an {@code UnsupportedOperationException} if the
* invocation would have no effect on the collection. For example, invoking
* the {@link #addAll(Collection)} method on an unmodifiable collection may,
* but is not required to, throw the exception if the collection to be added
......@@ -69,7 +69,7 @@ import java.util.stream.StreamSupport;
* they may contain.</a> For example, some implementations prohibit null elements,
* and some have restrictions on the types of their elements. Attempting to
* add an ineligible element throws an unchecked exception, typically
* <tt>NullPointerException</tt> or <tt>ClassCastException</tt>. Attempting
* {@code NullPointerException} or {@code ClassCastException}. Attempting
* to query the presence of an ineligible element may throw an exception,
* or it may simply return false; some implementations will exhibit the former
* behavior and some will exhibit the latter. More generally, attempting an
......@@ -90,13 +90,13 @@ import java.util.stream.StreamSupport;
* <p>Many methods in Collections Framework interfaces are defined in
* terms of the {@link Object#equals(Object) equals} method. For example,
* the specification for the {@link #contains(Object) contains(Object o)}
* method says: "returns <tt>true</tt> if and only if this collection
* contains at least one element <tt>e</tt> such that
* <tt>(o==null ? e==null : o.equals(e))</tt>." This specification should
* <i>not</i> be construed to imply that invoking <tt>Collection.contains</tt>
* with a non-null argument <tt>o</tt> will cause <tt>o.equals(e)</tt> to be
* invoked for any element <tt>e</tt>. Implementations are free to implement
* optimizations whereby the <tt>equals</tt> invocation is avoided, for
* method says: "returns {@code true} if and only if this collection
* contains at least one element {@code e} such that
* {@code (o==null ? e==null : o.equals(e))}." This specification should
* <i>not</i> be construed to imply that invoking {@code Collection.contains}
* with a non-null argument {@code o} will cause {@code o.equals(e)} to be
* invoked for any element {@code e}. Implementations are free to implement
* optimizations whereby the {@code equals} invocation is avoided, for
* example, by first comparing the hash codes of the two elements. (The
* {@link Object#hashCode()} specification guarantees that two objects with
* unequal hash codes cannot be equal.) More generally, implementations of
......@@ -146,28 +146,28 @@ public interface Collection<E> extends Iterable<E> {
/**
* Returns the number of elements in this collection. If this collection
* contains more than <tt>Integer.MAX_VALUE</tt> elements, returns
* <tt>Integer.MAX_VALUE</tt>.
* contains more than {@code Integer.MAX_VALUE} elements, returns
* {@code Integer.MAX_VALUE}.
*
* @return the number of elements in this collection
*/
int size();
/**
* Returns <tt>true</tt> if this collection contains no elements.
* Returns {@code true} if this collection contains no elements.
*
* @return <tt>true</tt> if this collection contains no elements
* @return {@code true} if this collection contains no elements
*/
boolean isEmpty();
/**
* Returns <tt>true</tt> if this collection contains the specified element.
* More formally, returns <tt>true</tt> if and only if this collection
* contains at least one element <tt>e</tt> such that
* <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>.
* Returns {@code true} if this collection contains the specified element.
* More formally, returns {@code true} if and only if this collection
* contains at least one element {@code e} such that
* {@code Objects.equals(o, e)}.
*
* @param o element whose presence in this collection is to be tested
* @return <tt>true</tt> if this collection contains the specified
* @return {@code true} if this collection contains the specified
* element
* @throws ClassCastException if the type of the specified element
* is incompatible with this collection
......@@ -184,7 +184,7 @@ public interface Collection<E> extends Iterable<E> {
* (unless this collection is an instance of some class that provides a
* guarantee).
*
* @return an <tt>Iterator</tt> over the elements in this collection
* @return an {@code Iterator} over the elements in this collection
*/
Iterator<E> iterator();
......@@ -216,9 +216,9 @@ public interface Collection<E> extends Iterable<E> {
* <p>If this collection fits in the specified array with room to spare
* (i.e., the array has more elements than this collection), the element
* in the array immediately following the end of the collection is set to
* <tt>null</tt>. (This is useful in determining the length of this
* {@code null}. (This is useful in determining the length of this
* collection <i>only</i> if the caller knows that this collection does
* not contain any <tt>null</tt> elements.)
* not contain any {@code null} elements.)
*
* <p>If this collection makes any guarantees as to what order its elements
* are returned by its iterator, this method must return the elements in
......@@ -229,15 +229,15 @@ public interface Collection<E> extends Iterable<E> {
* precise control over the runtime type of the output array, and may,
* under certain circumstances, be used to save allocation costs.
*
* <p>Suppose <tt>x</tt> is a collection known to contain only strings.
* <p>Suppose {@code x} is a collection known to contain only strings.
* The following code can be used to dump the collection into a newly
* allocated array of <tt>String</tt>:
* allocated array of {@code String}:
*
* <pre>
* String[] y = x.toArray(new String[0]);</pre>
*
* Note that <tt>toArray(new Object[0])</tt> is identical in function to
* <tt>toArray()</tt>.
* Note that {@code toArray(new Object[0])} is identical in function to
* {@code toArray()}.
*
* @param <T> the runtime type of the array to contain the collection
* @param a the array into which the elements of this collection are to be
......@@ -255,27 +255,27 @@ public interface Collection<E> extends Iterable<E> {
/**
* Ensures that this collection contains the specified element (optional
* operation). Returns <tt>true</tt> if this collection changed as a
* result of the call. (Returns <tt>false</tt> if this collection does
* operation). Returns {@code true} if this collection changed as a
* result of the call. (Returns {@code false} if this collection does
* not permit duplicates and already contains the specified element.)<p>
*
* Collections that support this operation may place limitations on what
* elements may be added to this collection. In particular, some
* collections will refuse to add <tt>null</tt> elements, and others will
* collections will refuse to add {@code null} elements, and others will
* impose restrictions on the type of elements that may be added.
* Collection classes should clearly specify in their documentation any
* restrictions on what elements may be added.<p>
*
* If a collection refuses to add a particular element for any reason
* other than that it already contains the element, it <i>must</i> throw
* an exception (rather than returning <tt>false</tt>). This preserves
* an exception (rather than returning {@code false}). This preserves
* the invariant that a collection always contains the specified element
* after this call returns.
*
* @param e element whose presence in this collection is to be ensured
* @return <tt>true</tt> if this collection changed as a result of the
* @return {@code true} if this collection changed as a result of the
* call
* @throws UnsupportedOperationException if the <tt>add</tt> operation
* @throws UnsupportedOperationException if the {@code add} operation
* is not supported by this collection
* @throws ClassCastException if the class of the specified element
* prevents it from being added to this collection
......@@ -291,21 +291,21 @@ public interface Collection<E> extends Iterable<E> {
/**
* Removes a single instance of the specified element from this
* collection, if it is present (optional operation). More formally,
* removes an element <tt>e</tt> such that
* <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>, if
* removes an element {@code e} such that
* {@code Objects.equals(o, e)}, if
* this collection contains one or more such elements. Returns
* <tt>true</tt> if this collection contained the specified element (or
* {@code true} if this collection contained the specified element (or
* equivalently, if this collection changed as a result of the call).
*
* @param o element to be removed from this collection, if present
* @return <tt>true</tt> if an element was removed as a result of this call
* @return {@code true} if an element was removed as a result of this call
* @throws ClassCastException if the type of the specified element
* is incompatible with this collection
* (<a href="#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified element is null and this
* collection does not permit null elements
* (<a href="#optional-restrictions">optional</a>)
* @throws UnsupportedOperationException if the <tt>remove</tt> operation
* @throws UnsupportedOperationException if the {@code remove} operation
* is not supported by this collection
*/
boolean remove(Object o);
......@@ -314,11 +314,11 @@ public interface Collection<E> extends Iterable<E> {
// Bulk Operations
/**
* Returns <tt>true</tt> if this collection contains all of the elements
* Returns {@code true} if this collection contains all of the elements
* in the specified collection.
*
* @param c collection to be checked for containment in this collection
* @return <tt>true</tt> if this collection contains all of the elements
* @return {@code true} if this collection contains all of the elements
* in the specified collection
* @throws ClassCastException if the types of one or more elements
* in the specified collection are incompatible with this
......@@ -342,8 +342,8 @@ public interface Collection<E> extends Iterable<E> {
* nonempty.)
*
* @param c collection containing elements to be added to this collection
* @return <tt>true</tt> if this collection changed as a result of the call
* @throws UnsupportedOperationException if the <tt>addAll</tt> operation
* @return {@code true} if this collection changed as a result of the call
* @throws UnsupportedOperationException if the {@code addAll} operation
* is not supported by this collection
* @throws ClassCastException if the class of an element of the specified
* collection prevents it from being added to this collection
......@@ -366,9 +366,9 @@ public interface Collection<E> extends Iterable<E> {
* collection.
*
* @param c collection containing elements to be removed from this collection
* @return <tt>true</tt> if this collection changed as a result of the
* @return {@code true} if this collection changed as a result of the
* call
* @throws UnsupportedOperationException if the <tt>removeAll</tt> method
* @throws UnsupportedOperationException if the {@code removeAll} method
* is not supported by this collection
* @throws ClassCastException if the types of one or more elements
* in this collection are incompatible with the specified
......@@ -426,8 +426,8 @@ public interface Collection<E> extends Iterable<E> {
* specified collection.
*
* @param c collection containing elements to be retained in this collection
* @return <tt>true</tt> if this collection changed as a result of the call
* @throws UnsupportedOperationException if the <tt>retainAll</tt> operation
* @return {@code true} if this collection changed as a result of the call
* @throws UnsupportedOperationException if the {@code retainAll} operation
* is not supported by this collection
* @throws ClassCastException if the types of one or more elements
* in this collection are incompatible with the specified
......@@ -447,7 +447,7 @@ public interface Collection<E> extends Iterable<E> {
* Removes all of the elements from this collection (optional operation).
* The collection will be empty after this method returns.
*
* @throws UnsupportedOperationException if the <tt>clear</tt> operation
* @throws UnsupportedOperationException if the {@code clear} operation
* is not supported by this collection
*/
void clear();
......@@ -458,30 +458,30 @@ public interface Collection<E> extends Iterable<E> {
/**
* Compares the specified object with this collection for equality. <p>
*
* While the <tt>Collection</tt> interface adds no stipulations to the
* general contract for the <tt>Object.equals</tt>, programmers who
* implement the <tt>Collection</tt> interface "directly" (in other words,
* create a class that is a <tt>Collection</tt> but is not a <tt>Set</tt>
* or a <tt>List</tt>) must exercise care if they choose to override the
* <tt>Object.equals</tt>. It is not necessary to do so, and the simplest
* course of action is to rely on <tt>Object</tt>'s implementation, but
* While the {@code Collection} interface adds no stipulations to the
* general contract for the {@code Object.equals}, programmers who
* implement the {@code Collection} interface "directly" (in other words,
* create a class that is a {@code Collection} but is not a {@code Set}
* or a {@code List}) must exercise care if they choose to override the
* {@code Object.equals}. It is not necessary to do so, and the simplest
* course of action is to rely on {@code Object}'s implementation, but
* the implementor may wish to implement a "value comparison" in place of
* the default "reference comparison." (The <tt>List</tt> and
* <tt>Set</tt> interfaces mandate such value comparisons.)<p>
*
* The general contract for the <tt>Object.equals</tt> method states that
* equals must be symmetric (in other words, <tt>a.equals(b)</tt> if and
* only if <tt>b.equals(a)</tt>). The contracts for <tt>List.equals</tt>
* and <tt>Set.equals</tt> state that lists are only equal to other lists,
* and sets to other sets. Thus, a custom <tt>equals</tt> method for a
* collection class that implements neither the <tt>List</tt> nor
* <tt>Set</tt> interface must return <tt>false</tt> when this collection
* the default "reference comparison." (The {@code List} and
* {@code Set} interfaces mandate such value comparisons.)<p>
*
* The general contract for the {@code Object.equals} method states that
* equals must be symmetric (in other words, {@code a.equals(b)} if and
* only if {@code b.equals(a)}). The contracts for {@code List.equals}
* and {@code Set.equals} state that lists are only equal to other lists,
* and sets to other sets. Thus, a custom {@code equals} method for a
* collection class that implements neither the {@code List} nor
* {@code Set} interface must return {@code false} when this collection
* is compared to any list or set. (By the same logic, it is not possible
* to write a class that correctly implements both the <tt>Set</tt> and
* <tt>List</tt> interfaces.)
* to write a class that correctly implements both the {@code Set} and
* {@code List} interfaces.)
*
* @param o object to be compared for equality with this collection
* @return <tt>true</tt> if the specified object is equal to this
* @return {@code true} if the specified object is equal to this
* collection
*
* @see Object#equals(Object)
......@@ -492,13 +492,13 @@ public interface Collection<E> extends Iterable<E> {
/**
* Returns the hash code value for this collection. While the
* <tt>Collection</tt> interface adds no stipulations to the general
* contract for the <tt>Object.hashCode</tt> method, programmers should
* take note that any class that overrides the <tt>Object.equals</tt>
* method must also override the <tt>Object.hashCode</tt> method in order
* to satisfy the general contract for the <tt>Object.hashCode</tt> method.
* In particular, <tt>c1.equals(c2)</tt> implies that
* <tt>c1.hashCode()==c2.hashCode()</tt>.
* {@code Collection} interface adds no stipulations to the general
* contract for the {@code Object.hashCode} method, programmers should
* take note that any class that overrides the {@code Object.equals}
* method must also override the {@code Object.hashCode} method in order
* to satisfy the general contract for the {@code Object.hashCode} method.
* In particular, {@code c1.equals(c2)} implies that
* {@code c1.hashCode()==c2.hashCode()}.
*
* @return the hash code value for this collection
*
......
......@@ -42,20 +42,20 @@ import java.util.Comparators;
* SortedMap sorted maps}), or to provide an ordering for collections of
* objects that don't have a {@link Comparable natural ordering}.<p>
*
* The ordering imposed by a comparator <tt>c</tt> on a set of elements
* <tt>S</tt> is said to be <i>consistent with equals</i> if and only if
* <tt>c.compare(e1, e2)==0</tt> has the same boolean value as
* <tt>e1.equals(e2)</tt> for every <tt>e1</tt> and <tt>e2</tt> in
* <tt>S</tt>.<p>
* The ordering imposed by a comparator {@code c} on a set of elements
* {@code S} is said to be <i>consistent with equals</i> if and only if
* {@code c.compare(e1, e2)==0} has the same boolean value as
* {@code e1.equals(e2)} for every {@code e1} and {@code e2} in
* {@code S}.<p>
*
* Caution should be exercised when using a comparator capable of imposing an
* ordering inconsistent with equals to order a sorted set (or sorted map).
* Suppose a sorted set (or sorted map) with an explicit comparator <tt>c</tt>
* is used with elements (or keys) drawn from a set <tt>S</tt>. If the
* ordering imposed by <tt>c</tt> on <tt>S</tt> is inconsistent with equals,
* Suppose a sorted set (or sorted map) with an explicit comparator {@code c}
* is used with elements (or keys) drawn from a set {@code S}. If the
* ordering imposed by {@code c} on {@code S} is inconsistent with equals,
* the sorted set (or sorted map) will behave "strangely." In particular the
* sorted set (or sorted map) will violate the general contract for set (or
* map), which is defined in terms of <tt>equals</tt>.<p>
* map), which is defined in terms of {@code equals}.<p>
*
* For example, suppose one adds two elements {@code a} and {@code b} such that
* {@code (a.equals(b) && c.compare(a, b) != 0)}
......@@ -67,23 +67,23 @@ import java.util.Comparators;
* {@link Set#add Set.add} method.<p>
*
* Note: It is generally a good idea for comparators to also implement
* <tt>java.io.Serializable</tt>, as they may be used as ordering methods in
* {@code java.io.Serializable}, as they may be used as ordering methods in
* serializable data structures (like {@link TreeSet}, {@link TreeMap}). In
* order for the data structure to serialize successfully, the comparator (if
* provided) must implement <tt>Serializable</tt>.<p>
* provided) must implement {@code Serializable}.<p>
*
* For the mathematically inclined, the <i>relation</i> that defines the
* <i>imposed ordering</i> that a given comparator <tt>c</tt> imposes on a
* given set of objects <tt>S</tt> is:<pre>
* <i>imposed ordering</i> that a given comparator {@code c} imposes on a
* given set of objects {@code S} is:<pre>
* {(x, y) such that c.compare(x, y) &lt;= 0}.
* </pre> The <i>quotient</i> for this total order is:<pre>
* {(x, y) such that c.compare(x, y) == 0}.
* </pre>
*
* It follows immediately from the contract for <tt>compare</tt> that the
* quotient is an <i>equivalence relation</i> on <tt>S</tt>, and that the
* imposed ordering is a <i>total order</i> on <tt>S</tt>. When we say that
* the ordering imposed by <tt>c</tt> on <tt>S</tt> is <i>consistent with
* It follows immediately from the contract for {@code compare} that the
* quotient is an <i>equivalence relation</i> on {@code S}, and that the
* imposed ordering is a <i>total order</i> on {@code S}. When we say that
* the ordering imposed by {@code c} on {@code S} is <i>consistent with
* equals</i>, we mean that the quotient for the ordering is the equivalence
* relation defined by the objects' {@link Object#equals(Object)
* equals(Object)} method(s):<pre>
......@@ -113,26 +113,26 @@ public interface Comparator<T> {
* to, or greater than the second.<p>
*
* In the foregoing description, the notation
* <tt>sgn(</tt><i>expression</i><tt>)</tt> designates the mathematical
* <i>signum</i> function, which is defined to return one of <tt>-1</tt>,
* <tt>0</tt>, or <tt>1</tt> according to whether the value of
* {@code sgn(}<i>expression</i>{@code )} designates the mathematical
* <i>signum</i> function, which is defined to return one of {@code -1},
* {@code 0}, or {@code 1} according to whether the value of
* <i>expression</i> is negative, zero or positive.<p>
*
* The implementor must ensure that <tt>sgn(compare(x, y)) ==
* -sgn(compare(y, x))</tt> for all <tt>x</tt> and <tt>y</tt>. (This
* implies that <tt>compare(x, y)</tt> must throw an exception if and only
* if <tt>compare(y, x)</tt> throws an exception.)<p>
* The implementor must ensure that {@code sgn(compare(x, y)) ==
* -sgn(compare(y, x))} for all {@code x} and {@code y}. (This
* implies that {@code compare(x, y)} must throw an exception if and only
* if {@code compare(y, x)} throws an exception.)<p>
*
* The implementor must also ensure that the relation is transitive:
* <tt>((compare(x, y)&gt;0) &amp;&amp; (compare(y, z)&gt;0))</tt> implies
* <tt>compare(x, z)&gt;0</tt>.<p>
* {@code ((compare(x, y)>0) && (compare(y, z)>0))} implies
* {@code compare(x, z)>0}.<p>
*
* Finally, the implementor must ensure that <tt>compare(x, y)==0</tt>
* implies that <tt>sgn(compare(x, z))==sgn(compare(y, z))</tt> for all
* <tt>z</tt>.<p>
* Finally, the implementor must ensure that {@code compare(x, y)==0}
* implies that {@code sgn(compare(x, z))==sgn(compare(y, z))} for all
* {@code z}.<p>
*
* It is generally the case, but <i>not</i> strictly required that
* <tt>(compare(x, y)==0) == (x.equals(y))</tt>. Generally speaking,
* {@code (compare(x, y)==0) == (x.equals(y))}. Generally speaking,
* any comparator that violates this condition should clearly indicate
* this fact. The recommended language is "Note: this comparator
* imposes orderings that are inconsistent with equals."
......@@ -153,19 +153,19 @@ public interface Comparator<T> {
* Indicates whether some other object is &quot;equal to&quot; this
* comparator. This method must obey the general contract of
* {@link Object#equals(Object)}. Additionally, this method can return
* <tt>true</tt> <i>only</i> if the specified object is also a comparator
* {@code true} <i>only</i> if the specified object is also a comparator
* and it imposes the same ordering as this comparator. Thus,
* <code>comp1.equals(comp2)</code> implies that <tt>sgn(comp1.compare(o1,
* o2))==sgn(comp2.compare(o1, o2))</tt> for every object reference
* <tt>o1</tt> and <tt>o2</tt>.<p>
* {@code comp1.equals(comp2)} implies that {@code sgn(comp1.compare(o1,
* o2))==sgn(comp2.compare(o1, o2))} for every object reference
* {@code o1} and {@code o2}.<p>
*
* Note that it is <i>always</i> safe <i>not</i> to override
* <tt>Object.equals(Object)</tt>. However, overriding this method may,
* {@code Object.equals(Object)}. However, overriding this method may,
* in some cases, improve performance by allowing programs to determine
* that two distinct comparators impose the same order.
*
* @param obj the reference object with which to compare.
* @return <code>true</code> only if the specified object is also
* @return {@code true} only if the specified object is also
* a comparator and it imposes the same ordering as this
* comparator.
* @see Object#equals(Object)
......
......@@ -26,14 +26,14 @@
package java.util;
/**
* The <code>Dictionary</code> class is the abstract parent of any
* class, such as <code>Hashtable</code>, which maps keys to values.
* Every key and every value is an object. In any one <tt>Dictionary</tt>
* The {@code Dictionary} class is the abstract parent of any
* class, such as {@code Hashtable}, which maps keys to values.
* Every key and every value is an object. In any one {@code Dictionary}
* object, every key is associated with at most one value. Given a
* <tt>Dictionary</tt> and a key, the associated element can be looked up.
* Any non-<code>null</code> object can be used as a key and as a value.
* {@code Dictionary} and a key, the associated element can be looked up.
* Any non-{@code null} object can be used as a key and as a value.
* <p>
* As a rule, the <code>equals</code> method should be used by
* As a rule, the {@code equals} method should be used by
* implementations of this class to decide if two keys are the same.
* <p>
* <strong>NOTE: This class is obsolete. New implementations should
......@@ -64,17 +64,17 @@ class Dictionary<K,V> {
/**
* Tests if this dictionary maps no keys to value. The general contract
* for the <tt>isEmpty</tt> method is that the result is true if and only
* for the {@code isEmpty} method is that the result is true if and only
* if this dictionary contains no entries.
*
* @return <code>true</code> if this dictionary maps no keys to values;
* <code>false</code> otherwise.
* @return {@code true} if this dictionary maps no keys to values;
* {@code false} otherwise.
*/
abstract public boolean isEmpty();
/**
* Returns an enumeration of the keys in this dictionary. The general
* contract for the keys method is that an <tt>Enumeration</tt> object
* contract for the keys method is that an {@code Enumeration} object
* is returned that will generate all the keys for which this dictionary
* contains entries.
*
......@@ -86,8 +86,8 @@ class Dictionary<K,V> {
/**
* Returns an enumeration of the values in this dictionary. The general
* contract for the <tt>elements</tt> method is that an
* <tt>Enumeration</tt> is returned that will generate all the elements
* contract for the {@code elements} method is that an
* {@code Enumeration} is returned that will generate all the elements
* contained in entries in this dictionary.
*
* @return an enumeration of the values in this dictionary.
......@@ -98,58 +98,58 @@ class Dictionary<K,V> {
/**
* Returns the value to which the key is mapped in this dictionary.
* The general contract for the <tt>isEmpty</tt> method is that if this
* The general contract for the {@code isEmpty} method is that if this
* dictionary contains an entry for the specified key, the associated
* value is returned; otherwise, <tt>null</tt> is returned.
* value is returned; otherwise, {@code null} is returned.
*
* @return the value to which the key is mapped in this dictionary;
* @param key a key in this dictionary.
* <code>null</code> if the key is not mapped to any value in
* {@code null} if the key is not mapped to any value in
* this dictionary.
* @exception NullPointerException if the <tt>key</tt> is <tt>null</tt>.
* @exception NullPointerException if the {@code key} is {@code null}.
* @see java.util.Dictionary#put(java.lang.Object, java.lang.Object)
*/
abstract public V get(Object key);
/**
* Maps the specified <code>key</code> to the specified
* <code>value</code> in this dictionary. Neither the key nor the
* value can be <code>null</code>.
* Maps the specified {@code key} to the specified
* {@code value} in this dictionary. Neither the key nor the
* value can be {@code null}.
* <p>
* If this dictionary already contains an entry for the specified
* <tt>key</tt>, the value already in this dictionary for that
* <tt>key</tt> is returned, after modifying the entry to contain the
* {@code key}, the value already in this dictionary for that
* {@code key} is returned, after modifying the entry to contain the
* new element. <p>If this dictionary does not already have an entry
* for the specified <tt>key</tt>, an entry is created for the
* specified <tt>key</tt> and <tt>value</tt>, and <tt>null</tt> is
* for the specified {@code key}, an entry is created for the
* specified {@code key} and {@code value}, and {@code null} is
* returned.
* <p>
* The <code>value</code> can be retrieved by calling the
* <code>get</code> method with a <code>key</code> that is equal to
* the original <code>key</code>.
* The {@code value} can be retrieved by calling the
* {@code get} method with a {@code key} that is equal to
* the original {@code key}.
*
* @param key the hashtable key.
* @param value the value.
* @return the previous value to which the <code>key</code> was mapped
* in this dictionary, or <code>null</code> if the key did not
* @return the previous value to which the {@code key} was mapped
* in this dictionary, or {@code null} if the key did not
* have a previous mapping.
* @exception NullPointerException if the <code>key</code> or
* <code>value</code> is <code>null</code>.
* @exception NullPointerException if the {@code key} or
* {@code value} is {@code null}.
* @see java.lang.Object#equals(java.lang.Object)
* @see java.util.Dictionary#get(java.lang.Object)
*/
abstract public V put(K key, V value);
/**
* Removes the <code>key</code> (and its corresponding
* <code>value</code>) from this dictionary. This method does nothing
* if the <code>key</code> is not in this dictionary.
* Removes the {@code key} (and its corresponding
* {@code value}) from this dictionary. This method does nothing
* if the {@code key} is not in this dictionary.
*
* @param key the key that needs to be removed.
* @return the value to which the <code>key</code> had been mapped in this
* dictionary, or <code>null</code> if the key did not have a
* @return the value to which the {@code key} had been mapped in this
* dictionary, or {@code null} if the key did not have a
* mapping.
* @exception NullPointerException if <tt>key</tt> is <tt>null</tt>.
* @exception NullPointerException if {@code key} is {@code null}.
*/
abstract public V remove(Object key);
}
......@@ -29,7 +29,7 @@ package java.util;
* Unchecked exception thrown when duplicate flags are provided in the format
* specifier.
*
* <p> Unless otherwise specified, passing a <tt>null</tt> argument to any
* <p> Unless otherwise specified, passing a {@code null} argument to any
* method or constructor in this class will cause a {@link
* NullPointerException} to be thrown.
*
......
......@@ -26,7 +26,7 @@
package java.util;
/**
* Thrown by methods in the <code>Stack</code> class to indicate
* Thrown by methods in the {@code Stack} class to indicate
* that the stack is empty.
*
* @author Jonathan Payne
......@@ -38,7 +38,7 @@ class EmptyStackException extends RuntimeException {
private static final long serialVersionUID = 5084686378493302095L;
/**
* Constructs a new <code>EmptyStackException</code> with <tt>null</tt>
* Constructs a new {@code EmptyStackException} with {@code null}
* as its error message string.
*/
public EmptyStackException() {
......
......@@ -50,7 +50,7 @@ import sun.misc.SharedSecrets;
* presence of a null key or to remove one will, however, function properly.
* Null values are permitted.
* <P>Like most collection implementations <tt>EnumMap</tt> is not
* <P>Like most collection implementations {@code EnumMap} is not
* synchronized. If multiple threads access an enum map concurrently, and at
* least one of the threads modifies the map, it should be synchronized
* externally. This is typically accomplished by synchronizing on some
......@@ -80,7 +80,7 @@ public class EnumMap<K extends Enum<K>, V> extends AbstractMap<K, V>
implements java.io.Serializable, Cloneable
{
/**
* The <tt>Class</tt> object for the enum type of all the keys of this map.
* The {@code Class} object for the enum type of all the keys of this map.
*
* @serial
*/
......@@ -131,7 +131,7 @@ public class EnumMap<K extends Enum<K>, V> extends AbstractMap<K, V>
* Creates an empty enum map with the specified key type.
*
* @param keyType the class object of the key type for this enum map
* @throws NullPointerException if <tt>keyType</tt> is null
* @throws NullPointerException if {@code keyType} is null
*/
public EnumMap(Class<K> keyType) {
this.keyType = keyType;
......@@ -144,7 +144,7 @@ public class EnumMap<K extends Enum<K>, V> extends AbstractMap<K, V>
* map, initially containing the same mappings (if any).
*
* @param m the enum map from which to initialize this enum map
* @throws NullPointerException if <tt>m</tt> is null
* @throws NullPointerException if {@code m} is null
*/
public EnumMap(EnumMap<K, ? extends V> m) {
keyType = m.keyType;
......@@ -155,15 +155,15 @@ public class EnumMap<K extends Enum<K>, V> extends AbstractMap<K, V>
/**
* Creates an enum map initialized from the specified map. If the
* specified map is an <tt>EnumMap</tt> instance, this constructor behaves
* specified map is an {@code EnumMap} instance, this constructor behaves
* identically to {@link #EnumMap(EnumMap)}. Otherwise, the specified map
* must contain at least one mapping (in order to determine the new
* enum map's key type).
*
* @param m the map from which to initialize this enum map
* @throws IllegalArgumentException if <tt>m</tt> is not an
* <tt>EnumMap</tt> instance and contains no mappings
* @throws NullPointerException if <tt>m</tt> is null
* @throws IllegalArgumentException if {@code m} is not an
* {@code EnumMap} instance and contains no mappings
* @throws NullPointerException if {@code m} is null
*/
public EnumMap(Map<K, ? extends V> m) {
if (m instanceof EnumMap) {
......@@ -194,11 +194,11 @@ public class EnumMap<K extends Enum<K>, V> extends AbstractMap<K, V>
}
/**
* Returns <tt>true</tt> if this map maps one or more keys to the
* Returns {@code true} if this map maps one or more keys to the
* specified value.
*
* @param value the value whose presence in this map is to be tested
* @return <tt>true</tt> if this map maps one or more keys to this value
* @return {@code true} if this map maps one or more keys to this value
*/
public boolean containsValue(Object value) {
value = maskNull(value);
......@@ -211,11 +211,11 @@ public class EnumMap<K extends Enum<K>, V> extends AbstractMap<K, V>
}
/**
* Returns <tt>true</tt> if this map contains a mapping for the specified
* Returns {@code true} if this map contains a mapping for the specified
* key.
*
* @param key the key whose presence in this map is to be tested
* @return <tt>true</tt> if this map contains a mapping for the specified
* @return {@code true} if this map contains a mapping for the specified
* key
*/
public boolean containsKey(Object key) {
......@@ -258,9 +258,9 @@ public class EnumMap<K extends Enum<K>, V> extends AbstractMap<K, V>
* @param value the value to be associated with the specified key
*
* @return the previous value associated with specified key, or
* <tt>null</tt> if there was no mapping for key. (A <tt>null</tt>
* {@code null} if there was no mapping for key. (A {@code null}
* return can also indicate that the map previously associated
* <tt>null</tt> with the specified key.)
* {@code null} with the specified key.)
* @throws NullPointerException if the specified key is null
*/
public V put(K key, V value) {
......@@ -279,9 +279,9 @@ public class EnumMap<K extends Enum<K>, V> extends AbstractMap<K, V>
*
* @param key the key whose mapping is to be removed from the map
* @return the previous value associated with specified key, or
* <tt>null</tt> if there was no entry for key. (A <tt>null</tt>
* {@code null} if there was no entry for key. (A {@code null}
* return can also indicate that the map previously associated
* <tt>null</tt> with the specified key.)
* {@code null} with the specified key.)
*/
public V remove(Object key) {
if (!isValidKey(key))
......@@ -644,12 +644,12 @@ public class EnumMap<K extends Enum<K>, V> extends AbstractMap<K, V>
/**
* Compares the specified object with this map for equality. Returns
* <tt>true</tt> if the given object is also a map and the two maps
* {@code true} if the given object is also a map and the two maps
* represent the same mappings, as specified in the {@link
* Map#equals(Object)} contract.
*
* @param o the object to be compared for equality with this map
* @return <tt>true</tt> if the specified object is equal to this map
* @return {@code true} if the specified object is equal to this map
*/
public boolean equals(Object o) {
if (this == o)
......@@ -758,7 +758,7 @@ public class EnumMap<K extends Enum<K>, V> extends AbstractMap<K, V>
private static final long serialVersionUID = 458661240069192865L;
/**
* Save the state of the <tt>EnumMap</tt> instance to a stream (i.e.,
* Save the state of the {@code EnumMap} instance to a stream (i.e.,
* serialize it).
*
* @serialData The <i>size</i> of the enum map (the number of key-value
......@@ -787,7 +787,7 @@ public class EnumMap<K extends Enum<K>, V> extends AbstractMap<K, V>
}
/**
* Reconstitute the <tt>EnumMap</tt> instance from a stream (i.e.,
* Reconstitute the {@code EnumMap} instance from a stream (i.e.,
* deserialize it).
*/
@SuppressWarnings("unchecked")
......
......@@ -34,11 +34,11 @@ import sun.misc.SharedSecrets;
* are represented internally as bit vectors. This representation is
* extremely compact and efficient. The space and time performance of this
* class should be good enough to allow its use as a high-quality, typesafe
* alternative to traditional <tt>int</tt>-based "bit flags." Even bulk
* operations (such as <tt>containsAll</tt> and <tt>retainAll</tt>) should
* alternative to traditional {@code int}-based "bit flags." Even bulk
* operations (such as {@code containsAll} and {@code retainAll}) should
* run very quickly if their argument is also an enum set.
*
* <p>The iterator returned by the <tt>iterator</tt> method traverses the
* <p>The iterator returned by the {@code iterator} method traverses the
* elements in their <i>natural order</i> (the order in which the enum
* constants are declared). The returned iterator is <i>weakly
* consistent</i>: it will never throw {@link ConcurrentModificationException}
......@@ -50,7 +50,7 @@ import sun.misc.SharedSecrets;
* presence of a null element or to remove one will, however, function
* properly.
*
* <P>Like most collection implementations, <tt>EnumSet</tt> is not
* <P>Like most collection implementations, {@code EnumSet} is not
* synchronized. If multiple threads access an enum set concurrently, and at
* least one of the threads modifies the set, it should be synchronized
* externally. This is typically accomplished by synchronizing on some
......@@ -106,7 +106,7 @@ public abstract class EnumSet<E extends Enum<E>> extends AbstractSet<E>
* @param elementType the class object of the element type for this enum
* set
* @return An empty enum set of the specified type.
* @throws NullPointerException if <tt>elementType</tt> is null
* @throws NullPointerException if {@code elementType} is null
*/
public static <E extends Enum<E>> EnumSet<E> noneOf(Class<E> elementType) {
Enum<?>[] universe = getUniverse(elementType);
......@@ -127,7 +127,7 @@ public abstract class EnumSet<E extends Enum<E>> extends AbstractSet<E>
* @param elementType the class object of the element type for this enum
* set
* @return An enum set containing all the elements in the specified type.
* @throws NullPointerException if <tt>elementType</tt> is null
* @throws NullPointerException if {@code elementType} is null
*/
public static <E extends Enum<E>> EnumSet<E> allOf(Class<E> elementType) {
EnumSet<E> result = noneOf(elementType);
......@@ -148,7 +148,7 @@ public abstract class EnumSet<E extends Enum<E>> extends AbstractSet<E>
* @param <E> The class of the elements in the set
* @param s the enum set from which to initialize this enum set
* @return A copy of the specified enum set.
* @throws NullPointerException if <tt>s</tt> is null
* @throws NullPointerException if {@code s} is null
*/
public static <E extends Enum<E>> EnumSet<E> copyOf(EnumSet<E> s) {
return s.clone();
......@@ -156,7 +156,7 @@ public abstract class EnumSet<E extends Enum<E>> extends AbstractSet<E>
/**
* Creates an enum set initialized from the specified collection. If
* the specified collection is an <tt>EnumSet</tt> instance, this static
* the specified collection is an {@code EnumSet} instance, this static
* factory method behaves identically to {@link #copyOf(EnumSet)}.
* Otherwise, the specified collection must contain at least one element
* (in order to determine the new enum set's element type).
......@@ -164,9 +164,9 @@ public abstract class EnumSet<E extends Enum<E>> extends AbstractSet<E>
* @param <E> The class of the elements in the collection
* @param c the collection from which to initialize this enum set
* @return An enum set initialized from the given collection.
* @throws IllegalArgumentException if <tt>c</tt> is not an
* <tt>EnumSet</tt> instance and contains no elements
* @throws NullPointerException if <tt>c</tt> is null
* @throws IllegalArgumentException if {@code c} is not an
* {@code EnumSet} instance and contains no elements
* @throws NullPointerException if {@code c} is null
*/
public static <E extends Enum<E>> EnumSet<E> copyOf(Collection<E> c) {
if (c instanceof EnumSet) {
......@@ -191,7 +191,7 @@ public abstract class EnumSet<E extends Enum<E>> extends AbstractSet<E>
* @param <E> The class of the elements in the enum set
* @param s the enum set from whose complement to initialize this enum set
* @return The complement of the specified set in this set
* @throws NullPointerException if <tt>s</tt> is null
* @throws NullPointerException if {@code s} is null
*/
public static <E extends Enum<E>> EnumSet<E> complementOf(EnumSet<E> s) {
EnumSet<E> result = copyOf(s);
......@@ -210,7 +210,7 @@ public abstract class EnumSet<E extends Enum<E>> extends AbstractSet<E>
*
* @param <E> The class of the specified element and of the set
* @param e the element that this set is to contain initially
* @throws NullPointerException if <tt>e</tt> is null
* @throws NullPointerException if {@code e} is null
* @return an enum set initially containing the specified element
*/
public static <E extends Enum<E>> EnumSet<E> of(E e) {
......@@ -332,7 +332,7 @@ public abstract class EnumSet<E extends Enum<E>> extends AbstractSet<E>
* @param first an element that the set is to contain initially
* @param rest the remaining elements the set is to contain initially
* @throws NullPointerException if any of the specified elements are null,
* or if <tt>rest</tt> is null
* or if {@code rest} is null
* @return an enum set initially containing the specified elements
*/
@SafeVarargs
......
......@@ -28,10 +28,10 @@ package java.util;
/**
* An object that implements the Enumeration interface generates a
* series of elements, one at a time. Successive calls to the
* <code>nextElement</code> method return successive elements of the
* {@code nextElement} method return successive elements of the
* series.
* <p>
* For example, to print all elements of a <tt>Vector&lt;E&gt;</tt> <i>v</i>:
* For example, to print all elements of a {@code Vector<E>} <i>v</i>:
* <pre>
* for (Enumeration&lt;E&gt; e = v.elements(); e.hasMoreElements();)
* System.out.println(e.nextElement());</pre>
......@@ -39,7 +39,7 @@ package java.util;
* Methods are provided to enumerate through the elements of a
* vector, the keys of a hashtable, and the values in a hashtable.
* Enumerations are also used to specify the input streams to a
* <code>SequenceInputStream</code>.
* {@code SequenceInputStream}.
*
* @apiNote
* The functionality of this interface is duplicated by the {@link Iterator}
......@@ -65,9 +65,9 @@ public interface Enumeration<E> {
/**
* Tests if this enumeration contains more elements.
*
* @return <code>true</code> if and only if this enumeration object
* @return {@code true} if and only if this enumeration object
* contains at least one more element to provide;
* <code>false</code> otherwise.
* {@code false} otherwise.
*/
boolean hasMoreElements();
......
......@@ -28,7 +28,7 @@ package java.util;
/**
* Unchecked exception thrown when a conversion and flag are incompatible.
*
* <p> Unless otherwise specified, passing a <tt>null</tt> argument to any
* <p> Unless otherwise specified, passing a {@code null} argument to any
* method or constructor in this class will cause a {@link
* NullPointerException} to be thrown.
*
......
......@@ -28,8 +28,8 @@ package java.util;
import java.io.IOException;
/**
* The <tt>Formattable</tt> interface must be implemented by any class that
* needs to perform custom formatting using the <tt>'s'</tt> conversion
* The {@code Formattable} interface must be implemented by any class that
* needs to perform custom formatting using the {@code 's'} conversion
* specifier of {@link java.util.Formatter}. This interface allows basic
* control for formatting arbitrary objects.
*
......@@ -110,7 +110,7 @@ import java.io.IOException;
* safety is optional and may be enforced by classes that extend and implement
* this interface.
*
* <p> Unless otherwise specified, passing a <tt>null</tt> argument to
* <p> Unless otherwise specified, passing a {@code null} argument to
* any method in this interface will cause a {@link
* NullPointerException} to be thrown.
*
......@@ -126,7 +126,7 @@ public interface Formattable {
* {@link Formatter#out() formatter.out()} or {@link
* Formatter#locale() formatter.locale()} to obtain the {@link
* Appendable} or {@link Locale} used by this
* <tt>formatter</tt> respectively.
* {@code formatter} respectively.
*
* @param flags
* The flags modify the output format. The value is interpreted as
......@@ -139,19 +139,19 @@ public interface Formattable {
* @param width
* The minimum number of characters to be written to the output.
* If the length of the converted value is less than the
* <tt>width</tt> then the output will be padded by
* <tt>'&nbsp;&nbsp;'</tt> until the total number of characters
* {@code width} then the output will be padded by
* <code>'&nbsp;&nbsp;'</code> until the total number of characters
* equals width. The padding is at the beginning by default. If
* the {@link FormattableFlags#LEFT_JUSTIFY} flag is set then the
* padding will be at the end. If <tt>width</tt> is <tt>-1</tt>
* padding will be at the end. If {@code width} is {@code -1}
* then there is no minimum.
*
* @param precision
* The maximum number of characters to be written to the output.
* The precision is applied before the width, thus the output will
* be truncated to <tt>precision</tt> characters even if the
* <tt>width</tt> is greater than the <tt>precision</tt>. If
* <tt>precision</tt> is <tt>-1</tt> then there is no explicit
* be truncated to {@code precision} characters even if the
* {@code width} is greater than the {@code precision}. If
* {@code precision} is {@code -1} then there is no explicit
* limit on the number of characters.
*
* @throws IllegalFormatException
......
......@@ -39,12 +39,12 @@ public class FormattableFlags {
private FormattableFlags() {}
/**
* Left-justifies the output. Spaces (<tt>'&#92;u0020'</tt>) will be added
* Left-justifies the output. Spaces (<code>'&#92;u0020'</code>) will be added
* at the end of the converted value as required to fill the minimum width
* of the field. If this flag is not set then the output will be
* right-justified.
*
* <p> This flag corresponds to <tt>'-'</tt> (<tt>'&#92;u002d'</tt>) in
* <p> This flag corresponds to {@code '-'} (<code>'&#92;u002d'</code>) in
* the format specifier.
*/
public static final int LEFT_JUSTIFY = 1<<0; // '-'
......@@ -52,23 +52,23 @@ public class FormattableFlags {
/**
* Converts the output to upper case according to the rules of the
* {@linkplain java.util.Locale locale} given during creation of the
* <tt>formatter</tt> argument of the {@link Formattable#formatTo
* {@code formatter} argument of the {@link Formattable#formatTo
* formatTo()} method. The output should be equivalent the following
* invocation of {@link String#toUpperCase(java.util.Locale)}
*
* <pre>
* out.toUpperCase() </pre>
*
* <p> This flag corresponds to <tt>'S'</tt> (<tt>'&#92;u0053'</tt>) in
* <p> This flag corresponds to {@code 'S'} (<code>'&#92;u0053'</code>) in
* the format specifier.
*/
public static final int UPPERCASE = 1<<1; // 'S'
/**
* Requires the output to use an alternate form. The definition of the
* form is specified by the <tt>Formattable</tt>.
* form is specified by the {@code Formattable}.
*
* <p> This flag corresponds to <tt>'#'</tt> (<tt>'&#92;u0023'</tt>) in
* <p> This flag corresponds to {@code '#'} (<code>'&#92;u0023'</code>) in
* the format specifier.
*/
public static final int ALTERNATE = 1<<2; // '#'
......
......@@ -28,7 +28,7 @@ package java.util;
/**
* Unchecked exception thrown when the formatter has been closed.
*
* <p> Unless otherwise specified, passing a <tt>null</tt> argument to any
* <p> Unless otherwise specified, passing a {@code null} argument to any
* method or constructor in this class will cause a {@link
* NullPointerException} to be thrown.
*
......
......@@ -36,24 +36,24 @@ import java.util.function.Consumer;
import java.util.function.Function;
/**
* Hash table based implementation of the <tt>Map</tt> interface. This
* Hash table based implementation of the {@code Map} interface. This
* implementation provides all of the optional map operations, and permits
* <tt>null</tt> values and the <tt>null</tt> key. (The <tt>HashMap</tt>
* class is roughly equivalent to <tt>Hashtable</tt>, except that it is
* {@code null} values and the {@code null} key. (The {@code HashMap}
* class is roughly equivalent to {@code Hashtable}, except that it is
* unsynchronized and permits nulls.) This class makes no guarantees as to
* the order of the map; in particular, it does not guarantee that the order
* will remain constant over time.
*
* <p>This implementation provides constant-time performance for the basic
* operations (<tt>get</tt> and <tt>put</tt>), assuming the hash function
* operations ({@code get} and {@code put}), assuming the hash function
* disperses the elements properly among the buckets. Iteration over
* collection views requires time proportional to the "capacity" of the
* <tt>HashMap</tt> instance (the number of buckets) plus its size (the number
* {@code HashMap} instance (the number of buckets) plus its size (the number
* of key-value mappings). Thus, it's very important not to set the initial
* capacity too high (or the load factor too low) if iteration performance is
* important.
*
* <p>An instance of <tt>HashMap</tt> has two parameters that affect its
* <p>An instance of {@code HashMap} has two parameters that affect its
* performance: <i>initial capacity</i> and <i>load factor</i>. The
* <i>capacity</i> is the number of buckets in the hash table, and the initial
* capacity is simply the capacity at the time the hash table is created. The
......@@ -67,15 +67,15 @@ import java.util.function.Function;
* <p>As a general rule, the default load factor (.75) offers a good
* tradeoff between time and space costs. Higher values decrease the
* space overhead but increase the lookup cost (reflected in most of
* the operations of the <tt>HashMap</tt> class, including
* <tt>get</tt> and <tt>put</tt>). The expected number of entries in
* the operations of the {@code HashMap} class, including
* {@code get} and {@code put}). The expected number of entries in
* the map and its load factor should be taken into account when
* setting its initial capacity, so as to minimize the number of
* rehash operations. If the initial capacity is greater than the
* maximum number of entries divided by the load factor, no rehash
* operations will ever occur.
*
* <p>If many mappings are to be stored in a <tt>HashMap</tt>
* <p>If many mappings are to be stored in a {@code HashMap}
* instance, creating it with a sufficiently large capacity will allow
* the mappings to be stored more efficiently than letting it perform
* automatic rehashing as needed to grow the table. Note that using
......@@ -102,7 +102,7 @@ import java.util.function.Function;
* <p>The iterators returned by all of this class's "collection view methods"
* are <i>fail-fast</i>: if the map is structurally modified at any time after
* the iterator is created, in any way except through the iterator's own
* <tt>remove</tt> method, the iterator will throw a
* {@code remove} method, the iterator will throw a
* {@link ConcurrentModificationException}. Thus, in the face of concurrent
* modification, the iterator fails quickly and cleanly, rather than risking
* arbitrary, non-deterministic behavior at an undetermined time in the
......@@ -111,7 +111,7 @@ import java.util.function.Function;
* <p>Note that the fail-fast behavior of an iterator cannot be guaranteed
* as it is, generally speaking, impossible to make any hard guarantees in the
* presence of unsynchronized concurrent modification. Fail-fast iterators
* throw <tt>ConcurrentModificationException</tt> on a best-effort basis.
* throw {@code ConcurrentModificationException} on a best-effort basis.
* Therefore, it would be wrong to write a program that depended on this
* exception for its correctness: <i>the fail-fast behavior of iterators
* should be used only to detect bugs.</i>
......@@ -435,7 +435,7 @@ public class HashMap<K,V> extends AbstractMap<K,V>
/* ---------------- Public operations -------------- */
/**
* Constructs an empty <tt>HashMap</tt> with the specified initial
* Constructs an empty {@code HashMap} with the specified initial
* capacity and load factor.
*
* @param initialCapacity the initial capacity
......@@ -457,7 +457,7 @@ public class HashMap<K,V> extends AbstractMap<K,V>
}
/**
* Constructs an empty <tt>HashMap</tt> with the specified initial
* Constructs an empty {@code HashMap} with the specified initial
* capacity and the default load factor (0.75).
*
* @param initialCapacity the initial capacity.
......@@ -468,7 +468,7 @@ public class HashMap<K,V> extends AbstractMap<K,V>
}
/**
* Constructs an empty <tt>HashMap</tt> with the default initial capacity
* Constructs an empty {@code HashMap} with the default initial capacity
* (16) and the default load factor (0.75).
*/
public HashMap() {
......@@ -476,10 +476,10 @@ public class HashMap<K,V> extends AbstractMap<K,V>
}
/**
* Constructs a new <tt>HashMap</tt> with the same mappings as the
* specified <tt>Map</tt>. The <tt>HashMap</tt> is created with
* Constructs a new {@code HashMap} with the same mappings as the
* specified {@code Map}. The {@code HashMap} is created with
* default load factor (0.75) and an initial capacity sufficient to
* hold the mappings in the specified <tt>Map</tt>.
* hold the mappings in the specified {@code Map}.
*
* @param m the map whose mappings are to be placed in this map
* @throws NullPointerException if the specified map is null
......@@ -526,9 +526,9 @@ public class HashMap<K,V> extends AbstractMap<K,V>
}
/**
* Returns <tt>true</tt> if this map contains no key-value mappings.
* Returns {@code true} if this map contains no key-value mappings.
*
* @return <tt>true</tt> if this map contains no key-value mappings
* @return {@code true} if this map contains no key-value mappings
*/
public boolean isEmpty() {
return size == 0;
......@@ -584,11 +584,11 @@ public class HashMap<K,V> extends AbstractMap<K,V>
}
/**
* Returns <tt>true</tt> if this map contains a mapping for the
* Returns {@code true} if this map contains a mapping for the
* specified key.
*
* @param key The key whose presence in this map is to be tested
* @return <tt>true</tt> if this map contains a mapping for the specified
* @return {@code true} if this map contains a mapping for the specified
* key.
*/
public boolean containsKey(Object key) {
......@@ -602,10 +602,10 @@ public class HashMap<K,V> extends AbstractMap<K,V>
*
* @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 <tt>key</tt>, or
* <tt>null</tt> if there was no mapping for <tt>key</tt>.
* (A <tt>null</tt> return can also indicate that the map
* previously associated <tt>null</tt> with <tt>key</tt>.)
* @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}.)
*/
public V put(K key, V value) {
return putVal(hash(key), key, value, false, true);
......@@ -788,10 +788,10 @@ public class HashMap<K,V> extends AbstractMap<K,V>
* Removes the mapping for the specified key from this map if present.
*
* @param key key whose mapping is to be removed from the map
* @return the previous value associated with <tt>key</tt>, or
* <tt>null</tt> if there was no mapping for <tt>key</tt>.
* (A <tt>null</tt> return can also indicate that the map
* previously associated <tt>null</tt> with <tt>key</tt>.)
* @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}.)
*/
public V remove(Object key) {
Node<K,V> e;
......@@ -865,11 +865,11 @@ public class HashMap<K,V> extends AbstractMap<K,V>
}
/**
* Returns <tt>true</tt> if this map maps one or more keys to the
* Returns {@code true} if this map maps one or more keys to the
* specified value.
*
* @param value value whose presence in this map is to be tested
* @return <tt>true</tt> if this map maps one or more keys to the
* @return {@code true} if this map maps one or more keys to the
* specified value
*/
public boolean containsValue(Object value) {
......@@ -891,12 +891,12 @@ public class HashMap<K,V> extends AbstractMap<K,V>
* 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 <tt>remove</tt> 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
* <tt>Iterator.remove</tt>, <tt>Set.remove</tt>,
* <tt>removeAll</tt>, <tt>retainAll</tt>, and <tt>clear</tt>
* operations. It does not support the <tt>add</tt> or <tt>addAll</tt>
* {@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.
*
* @return a set view of the keys contained in this map
......@@ -938,13 +938,13 @@ public class HashMap<K,V> extends AbstractMap<K,V>
* 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 <tt>remove</tt> 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 <tt>Iterator.remove</tt>,
* <tt>Collection.remove</tt>, <tt>removeAll</tt>,
* <tt>retainAll</tt> and <tt>clear</tt> operations. It does not
* support the <tt>add</tt> or <tt>addAll</tt> 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.
*
* @return a view of the values contained in this map
*/
......@@ -982,14 +982,14 @@ public class HashMap<K,V> extends AbstractMap<K,V>
* 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 <tt>remove</tt> operation, or through the
* <tt>setValue</tt> 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 <tt>Iterator.remove</tt>,
* <tt>Set.remove</tt>, <tt>removeAll</tt>, <tt>retainAll</tt> and
* <tt>clear</tt> operations. It does not support the
* <tt>add</tt> or <tt>addAll</tt> 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.
*
* @return a set view of the mappings contained in this map
*/
......@@ -1357,7 +1357,7 @@ public class HashMap<K,V> extends AbstractMap<K,V>
// Cloning and serialization
/**
* Returns a shallow copy of this <tt>HashMap</tt> instance: the keys and
* Returns a shallow copy of this {@code HashMap} instance: the keys and
* values themselves are not cloned.
*
* @return a shallow copy of this map
......@@ -1386,7 +1386,7 @@ public class HashMap<K,V> extends AbstractMap<K,V>
}
/**
* Save the state of the <tt>HashMap</tt> instance to a stream (i.e.,
* Save the state of the {@code HashMap} instance to a stream (i.e.,
* serialize it).
*
* @serialData The <i>capacity</i> of the HashMap (the length of the
......
......@@ -28,18 +28,18 @@ package java.util;
import java.io.InvalidObjectException;
/**
* This class implements the <tt>Set</tt> interface, backed by a hash table
* (actually a <tt>HashMap</tt> instance). It makes no guarantees as to the
* This class implements the {@code Set} interface, backed by a hash table
* (actually a {@code HashMap} instance). It makes no guarantees as to the
* iteration order of the set; in particular, it does not guarantee that the
* order will remain constant over time. This class permits the <tt>null</tt>
* order will remain constant over time. This class permits the {@code null}
* element.
*
* <p>This class offers constant time performance for the basic operations
* (<tt>add</tt>, <tt>remove</tt>, <tt>contains</tt> and <tt>size</tt>),
* ({@code add}, {@code remove}, {@code contains} and {@code size}),
* assuming the hash function disperses the elements properly among the
* buckets. Iterating over this set requires time proportional to the sum of
* the <tt>HashSet</tt> instance's size (the number of elements) plus the
* "capacity" of the backing <tt>HashMap</tt> instance (the number of
* the {@code HashSet} instance's size (the number of elements) plus the
* "capacity" of the backing {@code HashMap} instance (the number of
* buckets). Thus, it's very important not to set the initial capacity too
* high (or the load factor too low) if iteration performance is important.
*
......@@ -55,9 +55,9 @@ import java.io.InvalidObjectException;
* unsynchronized access to the set:<pre>
* Set s = Collections.synchronizedSet(new HashSet(...));</pre>
*
* <p>The iterators returned by this class's <tt>iterator</tt> method are
* <p>The iterators returned by this class's {@code iterator} method are
* <i>fail-fast</i>: if the set is modified at any time after the iterator is
* created, in any way except through the iterator's own <tt>remove</tt>
* created, in any way except through the iterator's own {@code remove}
* method, the Iterator throws a {@link ConcurrentModificationException}.
* Thus, in the face of concurrent modification, the iterator fails quickly
* and cleanly, rather than risking arbitrary, non-deterministic behavior at
......@@ -66,7 +66,7 @@ import java.io.InvalidObjectException;
* <p>Note that the fail-fast behavior of an iterator cannot be guaranteed
* as it is, generally speaking, impossible to make any hard guarantees in the
* presence of unsynchronized concurrent modification. Fail-fast iterators
* throw <tt>ConcurrentModificationException</tt> on a best-effort basis.
* throw {@code ConcurrentModificationException} on a best-effort basis.
* Therefore, it would be wrong to write a program that depended on this
* exception for its correctness: <i>the fail-fast behavior of iterators
* should be used only to detect bugs.</i>
......@@ -98,7 +98,7 @@ public class HashSet<E>
private static final Object PRESENT = new Object();
/**
* Constructs a new, empty set; the backing <tt>HashMap</tt> instance has
* Constructs a new, empty set; the backing {@code HashMap} instance has
* default initial capacity (16) and load factor (0.75).
*/
public HashSet() {
......@@ -107,7 +107,7 @@ public class HashSet<E>
/**
* Constructs a new set containing the elements in the specified
* collection. The <tt>HashMap</tt> is created with default load factor
* collection. The {@code HashMap} is created with default load factor
* (0.75) and an initial capacity sufficient to contain the elements in
* the specified collection.
*
......@@ -120,7 +120,7 @@ public class HashSet<E>
}
/**
* Constructs a new, empty set; the backing <tt>HashMap</tt> instance has
* Constructs a new, empty set; the backing {@code HashMap} instance has
* the specified initial capacity and the specified load factor.
*
* @param initialCapacity the initial capacity of the hash map
......@@ -133,7 +133,7 @@ public class HashSet<E>
}
/**
* Constructs a new, empty set; the backing <tt>HashMap</tt> instance has
* Constructs a new, empty set; the backing {@code HashMap} instance has
* the specified initial capacity and default load factor (0.75).
*
* @param initialCapacity the initial capacity of the hash table
......@@ -182,22 +182,22 @@ public class HashSet<E>
}
/**
* Returns <tt>true</tt> if this set contains no elements.
* Returns {@code true} if this set contains no elements.
*
* @return <tt>true</tt> if this set contains no elements
* @return {@code true} if this set contains no elements
*/
public boolean isEmpty() {
return map.isEmpty();
}
/**
* Returns <tt>true</tt> if this set contains the specified element.
* More formally, returns <tt>true</tt> if and only if this set
* contains an element <tt>e</tt> such that
* <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>.
* Returns {@code true} if this set contains the specified element.
* More formally, returns {@code true} if and only if this set
* contains an element {@code e} such that
* {@code Objects.equals(o, e)}.
*
* @param o element whose presence in this set is to be tested
* @return <tt>true</tt> if this set contains the specified element
* @return {@code true} if this set contains the specified element
*/
public boolean contains(Object o) {
return map.containsKey(o);
......@@ -205,14 +205,14 @@ public class HashSet<E>
/**
* Adds the specified element to this set if it is not already present.
* More formally, adds the specified element <tt>e</tt> to this set if
* this set contains no element <tt>e2</tt> such that
* <tt>(e==null&nbsp;?&nbsp;e2==null&nbsp;:&nbsp;e.equals(e2))</tt>.
* More formally, adds the specified element {@code e} to this set if
* this set contains no element {@code e2} such that
* {@code Objects.equals(e, e2)}.
* If this set already contains the element, the call leaves the set
* unchanged and returns <tt>false</tt>.
* unchanged and returns {@code false}.
*
* @param e element to be added to this set
* @return <tt>true</tt> if this set did not already contain the specified
* @return {@code true} if this set did not already contain the specified
* element
*/
public boolean add(E e) {
......@@ -221,15 +221,15 @@ public class HashSet<E>
/**
* Removes the specified element from this set if it is present.
* More formally, removes an element <tt>e</tt> such that
* <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>,
* if this set contains such an element. Returns <tt>true</tt> if
* More formally, removes an element {@code e} such that
* {@code Objects.equals(o, e)},
* if this set contains such an element. Returns {@code true} if
* this set contained the element (or equivalently, if this set
* changed as a result of the call). (This set will not contain the
* element once the call returns.)
*
* @param o object to be removed from this set, if present
* @return <tt>true</tt> if the set contained the specified element
* @return {@code true} if the set contained the specified element
*/
public boolean remove(Object o) {
return map.remove(o)==PRESENT;
......@@ -244,7 +244,7 @@ public class HashSet<E>
}
/**
* Returns a shallow copy of this <tt>HashSet</tt> instance: the elements
* Returns a shallow copy of this {@code HashSet} instance: the elements
* themselves are not cloned.
*
* @return a shallow copy of this set
......@@ -261,10 +261,10 @@ public class HashSet<E>
}
/**
* Save the state of this <tt>HashSet</tt> instance to a stream (that is,
* Save the state of this {@code HashSet} instance to a stream (that is,
* serialize it).
*
* @serialData The capacity of the backing <tt>HashMap</tt> instance
* @serialData The capacity of the backing {@code HashMap} instance
* (int), and its load factor (float) are emitted, followed by
* the size of the set (the number of elements it contains)
* (int), followed by all of its elements (each an Object) in
......@@ -288,7 +288,7 @@ public class HashSet<E>
}
/**
* Reconstitute the <tt>HashSet</tt> instance from a stream (that is,
* Reconstitute the {@code HashSet} instance from a stream (that is,
* deserialize it).
*/
private void readObject(java.io.ObjectInputStream s)
......
......@@ -30,7 +30,7 @@ package java.util;
* point as defined by {@link Character#isValidCodePoint} is passed to the
* {@link Formatter}.
*
* <p> Unless otherwise specified, passing a <tt>null</tt> argument to any
* <p> Unless otherwise specified, passing a {@code null} argument to any
* method or constructor in this class will cause a {@link
* NullPointerException} to be thrown.
*
......
......@@ -29,7 +29,7 @@ package java.util;
* Unchecked exception thrown when the argument corresponding to the format
* specifier is of an incompatible type.
*
* <p> Unless otherwise specified, passing a <tt>null</tt> argument to any
* <p> Unless otherwise specified, passing a {@code null} argument to any
* method or constructor in this class will cause a {@link
* NullPointerException} to be thrown.
*
......
......@@ -28,7 +28,7 @@ package java.util;
/**
* Unchecked exception thrown when an illegal combination flags is given.
*
* <p> Unless otherwise specified, passing a <tt>null</tt> argument to any
* <p> Unless otherwise specified, passing a {@code null} argument to any
* method or constructor in this class will cause a {@link
* NullPointerException} to be thrown.
*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册