# HG changeset patch # User dl # Date 1388730161 0 # Node ID ca113030b2b392b24abcfd201f521f5eb8b07caa # Parent a1ee9743f4ee165eae59389a020f2552f895dac8 8031133: AbstractMap should specify its default implementation using @implSpec Reviewed-by: chegar, alanb diff -r a1ee9743f4ee -r ca113030b2b3 jdk/src/share/classes/java/util/AbstractMap.java --- a/jdk/src/share/classes/java/util/AbstractMap.java Wed Jul 05 19:25:40 2017 +0200 +++ b/jdk/src/share/classes/java/util/AbstractMap.java Fri Jan 03 06:22:41 2014 +0000 @@ -78,7 +78,8 @@ /** * {@inheritDoc} * - *

This implementation returns entrySet().size(). + * @implSpec + * This implementation returns entrySet().size(). */ public int size() { return entrySet().size(); @@ -87,7 +88,8 @@ /** * {@inheritDoc} * - *

This implementation returns size() == 0. + * @implSpec + * This implementation returns size() == 0. */ public boolean isEmpty() { return size() == 0; @@ -96,7 +98,8 @@ /** * {@inheritDoc} * - *

This implementation iterates over entrySet() searching + * @implSpec + * This implementation iterates over entrySet() searching * for an entry with the specified value. If such an entry is found, * true is returned. If the iteration terminates without * finding such an entry, false is returned. Note that this @@ -126,7 +129,8 @@ /** * {@inheritDoc} * - *

This implementation iterates over entrySet() searching + * @implSpec + * This implementation iterates over entrySet() searching * for an entry with the specified key. If such an entry is found, * true is returned. If the iteration terminates without * finding such an entry, false is returned. Note that this @@ -157,7 +161,8 @@ /** * {@inheritDoc} * - *

This implementation iterates over entrySet() searching + * @implSpec + * This implementation iterates over 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, null is returned. Note that this @@ -191,7 +196,8 @@ /** * {@inheritDoc} * - *

This implementation always throws an + * @implSpec + * This implementation always throws an * UnsupportedOperationException. * * @throws UnsupportedOperationException {@inheritDoc} @@ -206,7 +212,8 @@ /** * {@inheritDoc} * - *

This implementation iterates over entrySet() searching for an + * @implSpec + * This implementation iterates over entrySet() searching for an * entry with the specified key. If such an entry is found, its value is * obtained with its getValue operation, the entry is removed * from the collection (and the backing map) with the iterator's @@ -255,7 +262,8 @@ /** * {@inheritDoc} * - *

This implementation iterates over the specified map's + * @implSpec + * This implementation iterates over the specified map's * entrySet() collection, and calls this map's put * operation once for each entry returned by the iteration. * @@ -276,7 +284,8 @@ /** * {@inheritDoc} * - *

This implementation calls entrySet().clear(). + * @implSpec + * This implementation calls entrySet().clear(). * *

Note that this implementation throws an * UnsupportedOperationException if the entrySet @@ -302,7 +311,8 @@ /** * {@inheritDoc} * - *

This implementation returns a set that subclasses {@link AbstractSet}. + * @implSpec + * This implementation returns a set that subclasses {@link AbstractSet}. * The subclass's iterator method returns a "wrapper object" over this * map's entrySet() iterator. The size method * delegates to this map's size method and the @@ -358,7 +368,8 @@ /** * {@inheritDoc} * - *

This implementation returns a collection that subclasses {@link + * @implSpec + * This implementation returns a collection that subclasses {@link * AbstractCollection}. The subclass's iterator method returns a * "wrapper object" over this map's entrySet() iterator. * The size method delegates to this map's size @@ -425,7 +436,8 @@ * equals method works properly across different implementations * of the Map interface. * - *

This implementation first checks if the specified object is this map; + * @implSpec + * This implementation first checks if the specified object is this map; * if so it returns 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 false. If so, it iterates over this map's @@ -478,7 +490,8 @@ * m1 and m2, as required by the general contract of * {@link Object#hashCode}. * - *

This implementation iterates over entrySet(), calling + * @implSpec + * This implementation iterates over entrySet(), calling * {@link Map.Entry#hashCode hashCode()} on each element (entry) in the * set, and adding up the results. *