diff --git a/src/main/java/org/apache/commons/collections4/map/AbstractHashedMap.java b/src/main/java/org/apache/commons/collections4/map/AbstractHashedMap.java index f51515679..70b7336ad 100644 --- a/src/main/java/org/apache/commons/collections4/map/AbstractHashedMap.java +++ b/src/main/java/org/apache/commons/collections4/map/AbstractHashedMap.java @@ -135,13 +135,13 @@ public class AbstractHashedMap extends AbstractMap implements Iterab * @param initialCapacity the initial capacity * @param loadFactor the load factor * @throws IllegalArgumentException if the initial capacity is negative - * @throws IllegalArgumentException if the load factor is less than or equal to zero + * @throws IllegalArgumentException if the load factor is less than or equal to zero */ @SuppressWarnings("unchecked") protected AbstractHashedMap(int initialCapacity, final float loadFactor) { super(); if (initialCapacity < 0) { - throw new IllegalArgumentException("Initial capacity must be a non negative number"); + throw new IllegalArgumentException("Initial capacity must be a non negative number"); } if (loadFactor <= 0.0f || Float.isNaN(loadFactor)) { throw new IllegalArgumentException("Load factor must be greater than 0"); @@ -311,9 +311,9 @@ public class AbstractHashedMap extends AbstractMap implements Iterab * This implementation iterates around the specified map and * uses {@link #put(Object, Object)}. *

- * It is private to allow the constructor to still call it - * even when putAll is overriden. - * + * It is private to allow the constructor to still call it + * even when putAll is overriden. + * * @param map the map to add * @throws NullPointerException if the map is null */ diff --git a/src/main/java/org/apache/commons/collections4/map/AbstractInputCheckedMapDecorator.java b/src/main/java/org/apache/commons/collections4/map/AbstractInputCheckedMapDecorator.java index 8886db016..733d5f68b 100644 --- a/src/main/java/org/apache/commons/collections4/map/AbstractInputCheckedMapDecorator.java +++ b/src/main/java/org/apache/commons/collections4/map/AbstractInputCheckedMapDecorator.java @@ -54,7 +54,7 @@ abstract class AbstractInputCheckedMapDecorator /** * Constructor that wraps (not copies). - * + * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if map is null */ @@ -70,7 +70,7 @@ abstract class AbstractInputCheckedMapDecorator * or it may transform the value into another object. *

* This implementation returns the input value. - * + * * @param value the value to check * @throws UnsupportedOperationException if the map may not be changed by setValue * @throws IllegalArgumentException if the specified value is invalid @@ -86,7 +86,7 @@ abstract class AbstractInputCheckedMapDecorator * has no effect as this optimises the implementation. *

* This implementation returns true. - * + * * @return true always */ protected boolean isSetValueChecking() { @@ -107,7 +107,7 @@ abstract class AbstractInputCheckedMapDecorator * Implementation of an entry set that checks additions via setValue. */ private class EntrySet extends AbstractSetDecorator> { - + /** Generated serial version ID. */ private static final long serialVersionUID = 4354731610923110264L; @@ -123,7 +123,7 @@ abstract class AbstractInputCheckedMapDecorator public Iterator> iterator() { return new EntrySetIterator(collection.iterator(), parent); } - + @Override @SuppressWarnings("unchecked") public Object[] toArray() { @@ -133,7 +133,7 @@ abstract class AbstractInputCheckedMapDecorator } return array; } - + @Override @SuppressWarnings("unchecked") public T[] toArray(final T[] array) { diff --git a/src/main/java/org/apache/commons/collections4/map/AbstractLinkedMap.java b/src/main/java/org/apache/commons/collections4/map/AbstractLinkedMap.java index df2608868..77d6531e3 100644 --- a/src/main/java/org/apache/commons/collections4/map/AbstractLinkedMap.java +++ b/src/main/java/org/apache/commons/collections4/map/AbstractLinkedMap.java @@ -60,7 +60,7 @@ import org.apache.commons.collections4.iterators.EmptyOrderedMapIterator; * @version $Id$ */ public abstract class AbstractLinkedMap extends AbstractHashedMap implements OrderedMap { - + /** Header in the linked list */ protected transient LinkEntry header; // TODO Privatise? @@ -73,7 +73,7 @@ public abstract class AbstractLinkedMap extends AbstractHashedMap im /** * Constructor which performs no validation on the passed in parameters. - * + * * @param initialCapacity the initial capacity, must be a power of two * @param loadFactor the load factor, must be > 0.0f and generally < 1.0f * @param threshold the threshold, must be sensible @@ -83,7 +83,7 @@ public abstract class AbstractLinkedMap extends AbstractHashedMap im } /** - * Constructs a new, empty map with the specified initial capacity. + * Constructs a new, empty map with the specified initial capacity. * * @param initialCapacity the initial capacity * @throws IllegalArgumentException if the initial capacity is negative @@ -94,7 +94,7 @@ public abstract class AbstractLinkedMap extends AbstractHashedMap im /** * Constructs a new, empty map with the specified initial capacity and - * load factor. + * load factor. * * @param initialCapacity the initial capacity * @param loadFactor the load factor @@ -131,7 +131,7 @@ public abstract class AbstractLinkedMap extends AbstractHashedMap im //----------------------------------------------------------------------- /** * Checks whether the map contains the specified value. - * + * * @param value the value to search for * @return true if the map contains the value */ @@ -168,7 +168,7 @@ public abstract class AbstractLinkedMap extends AbstractHashedMap im //----------------------------------------------------------------------- /** * Gets the first key in the map, which is the first inserted. - * + * * @return the eldest key */ public K firstKey() { @@ -180,7 +180,7 @@ public abstract class AbstractLinkedMap extends AbstractHashedMap im /** * Gets the last key in the map, which is the most recently inserted. - * + * * @return the most recently inserted key */ public K lastKey() { @@ -192,7 +192,7 @@ public abstract class AbstractLinkedMap extends AbstractHashedMap im /** * Gets the next key in sequence. - * + * * @param key the key to get after * @return the next key */ @@ -208,7 +208,7 @@ public abstract class AbstractLinkedMap extends AbstractHashedMap im /** * Gets the previous key in sequence. - * + * * @param key the key to get before * @return the previous key */ @@ -217,10 +217,10 @@ public abstract class AbstractLinkedMap extends AbstractHashedMap im return entry == null || entry.before == header ? null : entry.before.getKey(); } - //----------------------------------------------------------------------- + //----------------------------------------------------------------------- /** * Gets the key at the specified index. - * + * * @param index the index to retrieve * @return the key at the specified index * @throws IndexOutOfBoundsException if the index is invalid @@ -248,13 +248,13 @@ public abstract class AbstractLinkedMap extends AbstractHashedMap im } return entry; } - + /** * Adds an entry into this map, maintaining insertion order. *

* This implementation adds the entry to the data storage table and * to the end of the linked list. - * + * * @param entry the entry to add * @param hashIndex the index into the data array to store at */ @@ -272,7 +272,7 @@ public abstract class AbstractLinkedMap extends AbstractHashedMap im * Creates an entry to store the data. *

* This implementation creates a new LinkEntry instance. - * + * * @param next the next entry in sequence * @param hashCode the hash code to use * @param key the key to store @@ -289,7 +289,7 @@ public abstract class AbstractLinkedMap extends AbstractHashedMap im *

* This implementation removes the entry from the linked list chain, then * calls the superclass implementation. - * + * * @param entry the entry to remove * @param hashIndex the index into the data structure * @param previous the previous entry in the chain @@ -308,7 +308,7 @@ public abstract class AbstractLinkedMap extends AbstractHashedMap im /** * Gets the before field from a LinkEntry. * Used in subclasses that have no visibility of the field. - * + * * @param entry the entry to query, must not be null * @return the before field of the entry * @throws NullPointerException if the entry is null @@ -321,7 +321,7 @@ public abstract class AbstractLinkedMap extends AbstractHashedMap im /** * Gets the after field from a LinkEntry. * Used in subclasses that have no visibility of the field. - * + * * @param entry the entry to query, must not be null * @return the after field of the entry * @throws NullPointerException if the entry is null @@ -386,11 +386,11 @@ public abstract class AbstractLinkedMap extends AbstractHashedMap im } } - //----------------------------------------------------------------------- + //----------------------------------------------------------------------- /** * Creates an entry set iterator. * Subclasses can override this to return iterators with different properties. - * + * * @return the entrySet iterator */ @Override @@ -420,11 +420,11 @@ public abstract class AbstractLinkedMap extends AbstractHashedMap im } } - //----------------------------------------------------------------------- + //----------------------------------------------------------------------- /** * Creates a key set iterator. * Subclasses can override this to return iterators with different properties. - * + * * @return the keySet iterator */ @Override @@ -440,7 +440,7 @@ public abstract class AbstractLinkedMap extends AbstractHashedMap im */ protected static class KeySetIterator extends LinkIterator implements OrderedIterator, ResettableIterator { - + @SuppressWarnings("unchecked") protected KeySetIterator(final AbstractLinkedMap parent) { super((AbstractLinkedMap) parent); @@ -455,11 +455,11 @@ public abstract class AbstractLinkedMap extends AbstractHashedMap im } } - //----------------------------------------------------------------------- + //----------------------------------------------------------------------- /** * Creates a values iterator. * Subclasses can override this to return iterators with different properties. - * + * * @return the values iterator */ @Override @@ -507,7 +507,7 @@ public abstract class AbstractLinkedMap extends AbstractHashedMap im /** * Constructs a new entry. - * + * * @param next the next entry in the hash bucket sequence * @param hashCode the hash code * @param key the key diff --git a/src/main/java/org/apache/commons/collections4/map/AbstractMapDecorator.java b/src/main/java/org/apache/commons/collections4/map/AbstractMapDecorator.java index 718954ba4..993c93723 100644 --- a/src/main/java/org/apache/commons/collections4/map/AbstractMapDecorator.java +++ b/src/main/java/org/apache/commons/collections4/map/AbstractMapDecorator.java @@ -66,7 +66,7 @@ public abstract class AbstractMapDecorator extends AbstractIterableMap decorated() { @@ -121,7 +121,7 @@ public abstract class AbstractMapDecorator extends AbstractIterableMap values() { return decorated().values(); } - + @Override public boolean equals(final Object object) { if (object == this) { diff --git a/src/main/java/org/apache/commons/collections4/map/AbstractOrderedMapDecorator.java b/src/main/java/org/apache/commons/collections4/map/AbstractOrderedMapDecorator.java index 0667680d7..1cc5bb7d2 100644 --- a/src/main/java/org/apache/commons/collections4/map/AbstractOrderedMapDecorator.java +++ b/src/main/java/org/apache/commons/collections4/map/AbstractOrderedMapDecorator.java @@ -19,7 +19,7 @@ package org.apache.commons.collections4.map; import org.apache.commons.collections4.OrderedMap; import org.apache.commons.collections4.OrderedMapIterator; -/** +/** * Provides a base decorator that enables additional functionality to be added * to an OrderedMap via decoration. *

@@ -57,7 +57,7 @@ public abstract class AbstractOrderedMapDecorator extends AbstractMapDecor /** * Gets the map being decorated. - * + * * @return the decorated map */ @Override diff --git a/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java b/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java index 1f1094692..7611b489b 100644 --- a/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java +++ b/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java @@ -149,8 +149,8 @@ public abstract class AbstractReferenceMap extends AbstractHashedMap * load factor and initial capacity. * * @param keyType the type of reference to use for keys; - * must be {@link ReferenceStrength#HARD HARD}, - * {@link ReferenceStrength#SOFT SOFT}, + * must be {@link ReferenceStrength#HARD HARD}, + * {@link ReferenceStrength#SOFT SOFT}, * {@link ReferenceStrength#WEAK WEAK} * @param valueType the type of reference to use for values; * must be {@link ReferenceStrength#HARD}, diff --git a/src/main/java/org/apache/commons/collections4/map/AbstractSortedMapDecorator.java b/src/main/java/org/apache/commons/collections4/map/AbstractSortedMapDecorator.java index cd6b82989..c3c559391 100644 --- a/src/main/java/org/apache/commons/collections4/map/AbstractSortedMapDecorator.java +++ b/src/main/java/org/apache/commons/collections4/map/AbstractSortedMapDecorator.java @@ -27,7 +27,7 @@ import org.apache.commons.collections4.IterableSortedMap; import org.apache.commons.collections4.OrderedMapIterator; import org.apache.commons.collections4.iterators.ListIteratorWrapper; -/** +/** * Provides a base decorator that enables additional functionality to be added * to a Map via decoration. *

@@ -67,7 +67,7 @@ public abstract class AbstractSortedMapDecorator extends AbstractMapDecora /** * Gets the map being decorated. - * + * * @return the decorated map */ @Override diff --git a/src/main/java/org/apache/commons/collections4/map/CaseInsensitiveMap.java b/src/main/java/org/apache/commons/collections4/map/CaseInsensitiveMap.java index c107ddb81..dc73ee7a7 100644 --- a/src/main/java/org/apache/commons/collections4/map/CaseInsensitiveMap.java +++ b/src/main/java/org/apache/commons/collections4/map/CaseInsensitiveMap.java @@ -29,7 +29,7 @@ import java.util.Map; * to all lowercase in a locale-independent fashion by using information from the Unicode * data file. *

- * Null keys are supported. + * Null keys are supported. *

* The keySet() method returns all lowercase keys, or nulls. *

@@ -54,7 +54,7 @@ import java.util.Map; * Note that CaseInsensitiveMap is not synchronized and is not thread-safe. * If you wish to use this map from multiple threads concurrently, you must use * appropriate synchronization. The simplest approach is to wrap this map - * using {@link java.util.Collections#synchronizedMap(Map)}. This class may throw + * using {@link java.util.Collections#synchronizedMap(Map)}. This class may throw * exceptions when accessed by concurrent threads without synchronization. * * @since 3.0 @@ -73,7 +73,7 @@ public class CaseInsensitiveMap extends AbstractHashedMap implements } /** - * Constructs a new, empty map with the specified initial capacity. + * Constructs a new, empty map with the specified initial capacity. * * @param initialCapacity the initial capacity * @throws IllegalArgumentException if the initial capacity is negative @@ -84,7 +84,7 @@ public class CaseInsensitiveMap extends AbstractHashedMap implements /** * Constructs a new, empty map with the specified initial capacity and - * load factor. + * load factor. * * @param initialCapacity the initial capacity * @param loadFactor the load factor @@ -111,11 +111,11 @@ public class CaseInsensitiveMap extends AbstractHashedMap implements //----------------------------------------------------------------------- /** - * Overrides convertKey() from {@link AbstractHashedMap} to convert keys to + * Overrides convertKey() from {@link AbstractHashedMap} to convert keys to * lower case. *

* Returns {@link AbstractHashedMap#NULL} if key is null. - * + * * @param key the key convert * @return the converted key */ @@ -129,7 +129,7 @@ public class CaseInsensitiveMap extends AbstractHashedMap implements return new String(chars); } return AbstractHashedMap.NULL; - } + } //----------------------------------------------------------------------- /** @@ -157,5 +157,5 @@ public class CaseInsensitiveMap extends AbstractHashedMap implements in.defaultReadObject(); doReadObject(in); } - + } diff --git a/src/main/java/org/apache/commons/collections4/map/DefaultedMap.java b/src/main/java/org/apache/commons/collections4/map/DefaultedMap.java index 7951d74e2..7b0da586f 100644 --- a/src/main/java/org/apache/commons/collections4/map/DefaultedMap.java +++ b/src/main/java/org/apache/commons/collections4/map/DefaultedMap.java @@ -53,7 +53,7 @@ import org.apache.commons.collections4.functors.FactoryTransformer; * Note that DefaultedMap is not synchronized and is not thread-safe. * If you wish to use this map from multiple threads concurrently, you must use * appropriate synchronization. The simplest approach is to wrap this map - * using {@link java.util.Collections#synchronizedMap(Map)}. This class may throw + * using {@link java.util.Collections#synchronizedMap(Map)}. This class may throw * exceptions when accessed by concurrent threads without synchronization. * * @since 3.2 @@ -74,7 +74,7 @@ public class DefaultedMap extends AbstractMapDecorator implements Se * Factory method to create a defaulting map. *

* The value specified is returned when a missing key is found. - * + * * @param the key type * @param the value type * @param map the map to decorate, must not be null @@ -91,7 +91,7 @@ public class DefaultedMap extends AbstractMapDecorator implements Se *

* The factory specified is called when a missing key is found. * The result will be returned as the result of the map get(key) method. - * + * * @param the key type * @param the value type * @param map the map to decorate, must not be null @@ -112,7 +112,7 @@ public class DefaultedMap extends AbstractMapDecorator implements Se * The transformer specified is called when a missing key is found. * The key is passed to the transformer as the input, and the result * will be returned as the result of the map get(key) method. - * + * * @param the key type * @param the value type * @param map the map to decorate, must not be null @@ -135,7 +135,7 @@ public class DefaultedMap extends AbstractMapDecorator implements Se *

* The object passed in will be returned by the map whenever an * unknown key is requested. - * + * * @param defaultValue the default value to return when the key is not found */ public DefaultedMap(final V defaultValue) { @@ -153,7 +153,7 @@ public class DefaultedMap extends AbstractMapDecorator implements Se /** * Constructor that wraps (not copies). - * + * * @param map the map to decorate, must not be null * @param defaultValueTransformer the value transformer to use * @throws IllegalArgumentException if map or transformer is null @@ -169,7 +169,7 @@ public class DefaultedMap extends AbstractMapDecorator implements Se //----------------------------------------------------------------------- /** * Write the map out using a custom routine. - * + * * @param out the output stream * @throws IOException */ @@ -180,7 +180,7 @@ public class DefaultedMap extends AbstractMapDecorator implements Se /** * Read the map in using a custom routine. - * + * * @param in the input stream * @throws IOException * @throws ClassNotFoundException diff --git a/src/main/java/org/apache/commons/collections4/map/EntrySetToMapIteratorAdapter.java b/src/main/java/org/apache/commons/collections4/map/EntrySetToMapIteratorAdapter.java index f18b1bf2a..0d5c4aff8 100644 --- a/src/main/java/org/apache/commons/collections4/map/EntrySetToMapIteratorAdapter.java +++ b/src/main/java/org/apache/commons/collections4/map/EntrySetToMapIteratorAdapter.java @@ -106,7 +106,7 @@ public class EntrySetToMapIteratorAdapter implements MapIterator, Re * Get the currently active entry. * @return Map.Entry */ - protected synchronized Map.Entry current() { + protected synchronized Map.Entry current() { if (entry == null) { throw new IllegalStateException(); } diff --git a/src/main/java/org/apache/commons/collections4/map/FixedSizeMap.java b/src/main/java/org/apache/commons/collections4/map/FixedSizeMap.java index 8289e8f63..e94f66a01 100644 --- a/src/main/java/org/apache/commons/collections4/map/FixedSizeMap.java +++ b/src/main/java/org/apache/commons/collections4/map/FixedSizeMap.java @@ -36,15 +36,15 @@ import org.apache.commons.collections4.collection.UnmodifiableCollection; * key however. *

* If trying to remove or clear the map, an UnsupportedOperationException is - * thrown. If trying to put a new mapping into the map, an - * IllegalArgumentException is thrown. This is because the put method can + * thrown. If trying to put a new mapping into the map, an + * IllegalArgumentException is thrown. This is because the put method can * succeed if the mapping's key already exists in the map, so the put method * is not always unsupported. *

* Note that FixedSizeMap is not synchronized and is not thread-safe. * If you wish to use this map from multiple threads concurrently, you must use * appropriate synchronization. The simplest approach is to wrap this map - * using {@link java.util.Collections#synchronizedMap(Map)}. This class may throw + * using {@link java.util.Collections#synchronizedMap(Map)}. This class may throw * exceptions when accessed by concurrent threads without synchronization. *

* This class is Serializable from Commons Collections 3.1. @@ -61,7 +61,7 @@ public class FixedSizeMap /** * Factory method to create a fixed size map. - * + * * @param the key type * @param the value type * @param map the map to decorate, must not be null @@ -75,7 +75,7 @@ public class FixedSizeMap //----------------------------------------------------------------------- /** * Constructor that wraps (not copies). - * + * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if map is null */ @@ -86,7 +86,7 @@ public class FixedSizeMap //----------------------------------------------------------------------- /** * Write the map out using a custom routine. - * + * * @param out the output stream * @throws IOException * @since 3.1 @@ -98,13 +98,13 @@ public class FixedSizeMap /** * Read the map in using a custom routine. - * + * * @param in the input stream * @throws IOException * @throws ClassNotFoundException * @since 3.1 */ - @SuppressWarnings("unchecked") // (1) should only fail if input stream is incorrect + @SuppressWarnings("unchecked") // (1) should only fail if input stream is incorrect private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); map = (Map) in.readObject(); // (1) diff --git a/src/main/java/org/apache/commons/collections4/map/FixedSizeSortedMap.java b/src/main/java/org/apache/commons/collections4/map/FixedSizeSortedMap.java index 31b329823..fa2989c24 100644 --- a/src/main/java/org/apache/commons/collections4/map/FixedSizeSortedMap.java +++ b/src/main/java/org/apache/commons/collections4/map/FixedSizeSortedMap.java @@ -38,15 +38,15 @@ import org.apache.commons.collections4.collection.UnmodifiableCollection; * key however. *

* If trying to remove or clear the map, an UnsupportedOperationException is - * thrown. If trying to put a new mapping into the map, an - * IllegalArgumentException is thrown. This is because the put method can + * thrown. If trying to put a new mapping into the map, an + * IllegalArgumentException is thrown. This is because the put method can * succeed if the mapping's key already exists in the map, so the put method * is not always unsupported. *

* Note that FixedSizeSortedMap is not synchronized and is not thread-safe. * If you wish to use this map from multiple threads concurrently, you must use * appropriate synchronization. The simplest approach is to wrap this map - * using {@link java.util.Collections#synchronizedSortedMap}. This class may throw + * using {@link java.util.Collections#synchronizedSortedMap}. This class may throw * exceptions when accessed by concurrent threads without synchronization. *

* This class is Serializable from Commons Collections 3.1. @@ -63,7 +63,7 @@ public class FixedSizeSortedMap /** * Factory method to create a fixed size sorted map. - * + * * @param the key type * @param the value type * @param map the map to decorate, must not be null @@ -77,7 +77,7 @@ public class FixedSizeSortedMap //----------------------------------------------------------------------- /** * Constructor that wraps (not copies). - * + * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if map is null */ @@ -87,7 +87,7 @@ public class FixedSizeSortedMap /** * Gets the map being decorated. - * + * * @return the decorated map */ protected SortedMap getSortedMap() { @@ -106,7 +106,7 @@ public class FixedSizeSortedMap /** * Read the map in using a custom routine. */ - @SuppressWarnings("unchecked") // (1) should only fail if input stream is incorrect + @SuppressWarnings("unchecked") // (1) should only fail if input stream is incorrect private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); map = (Map) in.readObject(); // (1) diff --git a/src/main/java/org/apache/commons/collections4/map/Flat3Map.java b/src/main/java/org/apache/commons/collections4/map/Flat3Map.java index 2a7f5eef7..6b07d0570 100644 --- a/src/main/java/org/apache/commons/collections4/map/Flat3Map.java +++ b/src/main/java/org/apache/commons/collections4/map/Flat3Map.java @@ -795,7 +795,7 @@ public class Flat3Map implements IterableMap, Serializable, Cloneabl *

* As a consequence, all subsequent call to {@link #getKey()}, * {@link #setValue(Object)} and {@link #getValue()} will fail. - * + * * @param flag */ void setRemoved(final boolean flag) { diff --git a/src/main/java/org/apache/commons/collections4/map/LRUMap.java b/src/main/java/org/apache/commons/collections4/map/LRUMap.java index 4c2c6e68d..5520947c7 100644 --- a/src/main/java/org/apache/commons/collections4/map/LRUMap.java +++ b/src/main/java/org/apache/commons/collections4/map/LRUMap.java @@ -194,7 +194,7 @@ public class LRUMap modCount++; // remove if(entry.before == null) { - throw new IllegalStateException("Entry.before is null." + + throw new IllegalStateException("Entry.before is null." + " Please check that your keys are immutable, and that you have used synchronization properly." + " If so, then please report this to dev@commons.apache.org as a bug."); } @@ -426,7 +426,7 @@ public class LRUMap /** * Writes the data necessary for put() to work in deserialization. - * + * * @param out the output stream * @throws IOException if an error occurs while writing to the stream */ diff --git a/src/main/java/org/apache/commons/collections4/map/LazyMap.java b/src/main/java/org/apache/commons/collections4/map/LazyMap.java index ea9070431..ea96d5c2f 100644 --- a/src/main/java/org/apache/commons/collections4/map/LazyMap.java +++ b/src/main/java/org/apache/commons/collections4/map/LazyMap.java @@ -51,7 +51,7 @@ import org.apache.commons.collections4.functors.FactoryTransformer; * Note that LazyMap is not synchronized and is not thread-safe. * If you wish to use this map from multiple threads concurrently, you must use * appropriate synchronization. The simplest approach is to wrap this map - * using {@link java.util.Collections#synchronizedMap(Map)}. This class may throw + * using {@link java.util.Collections#synchronizedMap(Map)}. This class may throw * exceptions when accessed by concurrent threads without synchronization. *

* This class is Serializable from Commons Collections 3.1. @@ -69,7 +69,7 @@ public class LazyMap extends AbstractMapDecorator implements Map the key type * @param the value type * @param map the map to decorate, must not be null @@ -83,7 +83,7 @@ public class LazyMap extends AbstractMapDecorator implements Map the key type * @param the value type * @param map the map to decorate, must not be null @@ -98,7 +98,7 @@ public class LazyMap extends AbstractMapDecorator implements Map extends AbstractMapDecorator implements Map extends AbstractMapDecorator implements Map extends AbstractMapDecorator implements MapNote that LazySortedMap is not synchronized and is not thread-safe. * If you wish to use this map from multiple threads concurrently, you must use * appropriate synchronization. The simplest approach is to wrap this map - * using {@link java.util.Collections#synchronizedSortedMap}. This class may throw + * using {@link java.util.Collections#synchronizedSortedMap}. This class may throw * exceptions when accessed by concurrent threads without synchronization. *

* This class is Serializable from Commons Collections 3.1. @@ -63,7 +63,7 @@ public class LazySortedMap extends LazyMap implements SortedMap { /** * Factory method to create a lazily instantiated sorted map. - * + * * @param the key type * @param the value type * @param map the map to decorate, must not be null @@ -78,7 +78,7 @@ public class LazySortedMap extends LazyMap implements SortedMap { /** * Factory method to create a lazily instantiated sorted map. - * + * * @param the key type * @param the value type * @param map the map to decorate, must not be null @@ -94,7 +94,7 @@ public class LazySortedMap extends LazyMap implements SortedMap { //----------------------------------------------------------------------- /** * Constructor that wraps (not copies). - * + * * @param map the map to decorate, must not be null * @param factory the factory to use, must not be null * @throws IllegalArgumentException if map or factory is null @@ -105,7 +105,7 @@ public class LazySortedMap extends LazyMap implements SortedMap { /** * Constructor that wraps (not copies). - * + * * @param map the map to decorate, must not be null * @param factory the factory to use, must not be null * @throws IllegalArgumentException if map or factory is null @@ -117,7 +117,7 @@ public class LazySortedMap extends LazyMap implements SortedMap { //----------------------------------------------------------------------- /** * Gets the map being decorated. - * + * * @return the decorated map */ protected SortedMap getSortedMap() { diff --git a/src/main/java/org/apache/commons/collections4/map/LinkedMap.java b/src/main/java/org/apache/commons/collections4/map/LinkedMap.java index 0bdebab56..f7cab6d12 100644 --- a/src/main/java/org/apache/commons/collections4/map/LinkedMap.java +++ b/src/main/java/org/apache/commons/collections4/map/LinkedMap.java @@ -35,7 +35,7 @@ import org.apache.commons.collections4.list.UnmodifiableList; * A Map implementation that maintains the order of the entries. * In this implementation order is maintained by original insertion. *

- * This implementation improves on the JDK1.4 LinkedHashMap by adding the + * This implementation improves on the JDK1.4 LinkedHashMap by adding the * {@link org.apache.commons.collections4.MapIterator MapIterator} * functionality, additional convenience methods and allowing * bidirectional iteration. It also implements OrderedMap. @@ -54,7 +54,7 @@ import org.apache.commons.collections4.list.UnmodifiableList; * Note that LinkedMap is not synchronized and is not thread-safe. * If you wish to use this map from multiple threads concurrently, you must use * appropriate synchronization. The simplest approach is to wrap this map - * using {@link java.util.Collections#synchronizedMap(Map)}. This class may throw + * using {@link java.util.Collections#synchronizedMap(Map)}. This class may throw * exceptions when accessed by concurrent threads without synchronization. * * @since 3.0 @@ -64,7 +64,7 @@ public class LinkedMap extends AbstractLinkedMap implements Serializ /** Serialisation version */ private static final long serialVersionUID = 9077234323521161066L; - + /** * Constructs a new empty map with default size and load factor. */ @@ -73,7 +73,7 @@ public class LinkedMap extends AbstractLinkedMap implements Serializ } /** - * Constructs a new, empty map with the specified initial capacity. + * Constructs a new, empty map with the specified initial capacity. * * @param initialCapacity the initial capacity * @throws IllegalArgumentException if the initial capacity is negative @@ -84,7 +84,7 @@ public class LinkedMap extends AbstractLinkedMap implements Serializ /** * Constructs a new, empty map with the specified initial capacity and - * load factor. + * load factor. * * @param initialCapacity the initial capacity * @param loadFactor the load factor @@ -115,7 +115,7 @@ public class LinkedMap extends AbstractLinkedMap implements Serializ public LinkedMap clone() { return (LinkedMap) super.clone(); } - + /** * Write the map out using a custom routine. */ @@ -131,11 +131,11 @@ public class LinkedMap extends AbstractLinkedMap implements Serializ in.defaultReadObject(); doReadObject(in); } - + //----------------------------------------------------------------------- /** * Gets the key at the specified index. - * + * * @param index the index to retrieve * @return the key at the specified index * @throws IndexOutOfBoundsException if the index is invalid @@ -143,10 +143,10 @@ public class LinkedMap extends AbstractLinkedMap implements Serializ public K get(final int index) { return getEntry(index).getKey(); } - + /** * Gets the value at the specified index. - * + * * @param index the index to retrieve * @return the value at the specified index * @throws IndexOutOfBoundsException if the index is invalid @@ -154,10 +154,10 @@ public class LinkedMap extends AbstractLinkedMap implements Serializ public V getValue(final int index) { return getEntry(index).getValue(); } - + /** * Gets the index of the specified key. - * + * * @param key the key to find the index of * @return the index, or -1 if not found */ @@ -197,7 +197,7 @@ public class LinkedMap extends AbstractLinkedMap implements Serializ * An alternative to this method is to use {@link #keySet()}. * * @see #keySet() - * @return The ordered list of keys. + * @return The ordered list of keys. */ public List asList() { return new LinkedMapList(this); diff --git a/src/main/java/org/apache/commons/collections4/map/ListOrderedMap.java b/src/main/java/org/apache/commons/collections4/map/ListOrderedMap.java index 5e4556777..9de62ed0b 100644 --- a/src/main/java/org/apache/commons/collections4/map/ListOrderedMap.java +++ b/src/main/java/org/apache/commons/collections4/map/ListOrderedMap.java @@ -55,7 +55,7 @@ import org.apache.commons.collections4.list.UnmodifiableList; * Note that ListOrderedMap is not synchronized and is not thread-safe. * If you wish to use this map from multiple threads concurrently, you must use * appropriate synchronization. The simplest approach is to wrap this map - * using {@link java.util.Collections#synchronizedMap(Map)}. This class may throw + * using {@link java.util.Collections#synchronizedMap(Map)}. This class may throw * exceptions when accessed by concurrent threads without synchronization. *

* Note that ListOrderedMap doesn't work with @@ -89,7 +89,7 @@ public class ListOrderedMap * Factory method to create an ordered map. *

* An ArrayList is used to retain order. - * + * * @param the key type * @param the value type * @param map the map to decorate, must not be null @@ -104,7 +104,7 @@ public class ListOrderedMap /** * Constructs a new empty ListOrderedMap that decorates * a HashMap. - * + * * @since 3.1 */ public ListOrderedMap() { @@ -113,7 +113,7 @@ public class ListOrderedMap /** * Constructor that wraps (not copies). - * + * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if map is null */ @@ -125,7 +125,7 @@ public class ListOrderedMap //----------------------------------------------------------------------- /** * Write the map out using a custom routine. - * + * * @param out the output stream * @throws IOException * @since 3.1 @@ -137,13 +137,13 @@ public class ListOrderedMap /** * Read the map in using a custom routine. - * + * * @param in the input stream * @throws IOException * @throws ClassNotFoundException * @since 3.1 */ - @SuppressWarnings("unchecked") // (1) should only fail if input stream is incorrect + @SuppressWarnings("unchecked") // (1) should only fail if input stream is incorrect private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); map = (Map) in.readObject(); // (1) @@ -181,11 +181,11 @@ public class ListOrderedMap } return insertOrder.get(size() - 1); } - + /** * Gets the next key to the one specified using insert order. * This method performs a list search to find the key and is O(n). - * + * * @param key the key to find previous for * @return the next key, null if no match or at start */ @@ -200,7 +200,7 @@ public class ListOrderedMap /** * Gets the previous key to the one specified using insert order. * This method performs a list search to find the key and is O(n). - * + * * @param key the key to find previous for * @return the previous key, null if no match or at start */ @@ -342,7 +342,7 @@ public class ListOrderedMap //----------------------------------------------------------------------- /** * Returns the Map as a string. - * + * * @return the Map as a String */ @Override @@ -372,7 +372,7 @@ public class ListOrderedMap //----------------------------------------------------------------------- /** * Gets the key at the specified index. - * + * * @param index the index to retrieve * @return the key at the specified index * @throws IndexOutOfBoundsException if the index is invalid @@ -380,10 +380,10 @@ public class ListOrderedMap public K get(final int index) { return insertOrder.get(index); } - + /** * Gets the value at the specified index. - * + * * @param index the index to retrieve * @return the key at the specified index * @throws IndexOutOfBoundsException if the index is invalid @@ -391,10 +391,10 @@ public class ListOrderedMap public V getValue(final int index) { return get(insertOrder.get(index)); } - + /** * Gets the index of the specified key. - * + * * @param key the key to find the index of * @return the index, or -1 if not found */ @@ -480,7 +480,7 @@ public class ListOrderedMap * * @see #keyList() * @see #keySet() - * @return The ordered list of keys. + * @return The ordered list of keys. */ public List asList() { return keyList(); @@ -571,7 +571,7 @@ public class ListOrderedMap } } - //----------------------------------------------------------------------- + //----------------------------------------------------------------------- static class EntrySetView extends AbstractSet> { private final ListOrderedMap parent; private final List insertOrder; @@ -589,7 +589,7 @@ public class ListOrderedMap } return entrySet; } - + @Override public int size() { return this.parent.size(); @@ -656,7 +656,7 @@ public class ListOrderedMap static class ListOrderedIterator extends AbstractUntypedIteratorDecorator> { private final ListOrderedMap parent; private K last = null; - + ListOrderedIterator(final ListOrderedMap parent, final List insertOrder) { super(insertOrder.iterator()); this.parent = parent; @@ -716,7 +716,7 @@ public class ListOrderedMap readable = true; return last; } - + public boolean hasPrevious() { return iterator.hasPrevious(); } diff --git a/src/main/java/org/apache/commons/collections4/map/MultiKeyMap.java b/src/main/java/org/apache/commons/collections4/map/MultiKeyMap.java index 48f7f9e77..e9fc72ba7 100644 --- a/src/main/java/org/apache/commons/collections4/map/MultiKeyMap.java +++ b/src/main/java/org/apache/commons/collections4/map/MultiKeyMap.java @@ -102,7 +102,7 @@ public class MultiKeyMap extends AbstractMapDecorator(map); } - //----------------------------------------------------------------------- + //----------------------------------------------------------------------- /** * Constructs a new MultiKeyMap that decorates a HashedMap. */ @@ -126,7 +126,7 @@ public class MultiKeyMap extends AbstractMapDecorator extends AbstractMapDecorator extends AbstractMapDecorator extends AbstractMapDecorator extends AbstractMapDecorator extends AbstractMapDecorator extends AbstractMapDecorator extends AbstractMapDecorator extends AbstractMapDecorator extends AbstractMapDecorator extends AbstractMapDecorator extends AbstractMapDecorator extends AbstractMapDecorator extends AbstractMapDecorator extends AbstractMapDecorator extends AbstractMapDecorator extends AbstractMapDecorator extends AbstractMapDecorator extends AbstractMapDecorator extends AbstractMapDecorator extends AbstractMapDecorator extends AbstractMapDecorator extends AbstractMapDecorator extends AbstractMapDecorator extends AbstractMapDecorator * This method removes all the mappings where the MultiKey * has one or more keys, and the first matches that specified. - * + * * @param key1 the first key * @return true if any elements were removed */ @@ -725,7 +725,7 @@ public class MultiKeyMap extends AbstractMapDecorator * This method removes all the mappings where the MultiKey * has two or more keys, and the first two match those specified. - * + * * @param key1 the first key * @param key2 the second key * @return true if any elements were removed @@ -750,7 +750,7 @@ public class MultiKeyMap extends AbstractMapDecorator * This method removes all the mappings where the MultiKey * has three or more keys, and the first three match those specified. - * + * * @param key1 the first key * @param key2 the second key * @param key3 the third key @@ -777,7 +777,7 @@ public class MultiKeyMap extends AbstractMapDecorator * This method removes all the mappings where the MultiKey * has four or more keys, and the first four match those specified. - * + * * @param key1 the first key * @param key2 the second key * @param key3 the third key @@ -804,7 +804,7 @@ public class MultiKeyMap extends AbstractMapDecorator key) { @@ -831,7 +831,7 @@ public class MultiKeyMap extends AbstractMapDecorator extends AbstractMapDecorator extends AbstractMapDecorator, V> decorated() { return (AbstractHashedMap, V>) super.decorated(); } - + //----------------------------------------------------------------------- /** * Write the map out using a custom routine. - * + * * @param out the output stream * @throws IOException */ @@ -888,7 +888,7 @@ public class MultiKeyMap extends AbstractMapDecorator extends AbstractMapDecorator, V>) in.readObject(); } - + } diff --git a/src/main/java/org/apache/commons/collections4/map/MultiValueMap.java b/src/main/java/org/apache/commons/collections4/map/MultiValueMap.java index 536704496..c4f1bf451 100644 --- a/src/main/java/org/apache/commons/collections4/map/MultiValueMap.java +++ b/src/main/java/org/apache/commons/collections4/map/MultiValueMap.java @@ -150,7 +150,7 @@ public class MultiValueMap extends AbstractMapDecorator impleme //----------------------------------------------------------------------- /** * Write the map out using a custom routine. - * + * * @param out the output stream * @throws IOException * @since 4.0 @@ -162,13 +162,13 @@ public class MultiValueMap extends AbstractMapDecorator impleme /** * Read the map in using a custom routine. - * + * * @param in the input stream * @throws IOException * @throws ClassNotFoundException * @since 4.0 */ - @SuppressWarnings("unchecked") // (1) should only fail if input stream is incorrect + @SuppressWarnings("unchecked") // (1) should only fail if input stream is incorrect private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); map = (Map) in.readObject(); // (1) @@ -302,7 +302,7 @@ public class MultiValueMap extends AbstractMapDecorator impleme * NOTE: the returned Entry objects will contain as value a {@link Collection} * of all values that are mapped to the given key. To get a "flattened" version * of all mappings contained in this map, use {@link #iterator()}. - * + * * @see #iterator() */ @Override @@ -421,7 +421,7 @@ public class MultiValueMap extends AbstractMapDecorator impleme public Iterator> iterator() { final Collection allKeys = new ArrayList(keySet()); final Iterator keyIterator = allKeys.iterator(); - + return new LazyIteratorChain>() { @Override protected Iterator> nextIterator(int count) { diff --git a/src/main/java/org/apache/commons/collections4/map/PassiveExpiringMap.java b/src/main/java/org/apache/commons/collections4/map/PassiveExpiringMap.java index 706c083bf..6c00af122 100644 --- a/src/main/java/org/apache/commons/collections4/map/PassiveExpiringMap.java +++ b/src/main/java/org/apache/commons/collections4/map/PassiveExpiringMap.java @@ -54,7 +54,7 @@ import java.util.concurrent.TimeUnit; * This class may throw exceptions when accessed by concurrent threads without * synchronization. *

- * + * * @param the type of the keys in the map * @param the type of the values in the map * @since 4.0 @@ -68,7 +68,7 @@ public class PassiveExpiringMap * A {@link org.apache.commons.collections4.map.PassiveExpiringMap.ExpirationPolicy ExpirationPolicy} * that returns a expiration time that is a * constant about of time in the future from the current time. - * + * * @param the type of the keys in the map * @param the type of the values in the map * @since 4.0 @@ -96,7 +96,7 @@ public class PassiveExpiringMap * milliseconds. A negative time-to-live value indicates entries never * expire. A zero time-to-live value indicates entries expire (nearly) * immediately. - * + * * @param timeToLiveMillis the constant amount of time (in milliseconds) * an entry is available before it expires. A negative value * results in entries that NEVER expire. A zero value results in @@ -110,7 +110,7 @@ public class PassiveExpiringMap /** * Construct a policy with the given time-to-live constant measured in * the given time unit of measure. - * + * * @param timeToLive the constant amount of time an entry is available * before it expires. A negative value results in entries that * NEVER expire. A zero value results in entries that ALWAYS @@ -126,7 +126,7 @@ public class PassiveExpiringMap /** * Determine the expiration time for the given key-value entry. - * + * * @param key the key for the entry (ignored). * @param value the value for the entry (ignored). * @return if {@link #timeToLiveMillis} ≥ 0, an expiration time of @@ -155,7 +155,7 @@ public class PassiveExpiringMap /** * A policy to determine the expiration time for key-value entries. - * + * * @param the key object type. * @param the value object type * @since 4.0 @@ -166,7 +166,7 @@ public class PassiveExpiringMap /** * Determine the expiration time for the given key-value entry. - * + * * @param key the key for the entry. * @param value the value for the entry. * @return the expiration time value measured in milliseconds. A @@ -183,7 +183,7 @@ public class PassiveExpiringMap * the given time measured in the given units to the same time measured in * milliseconds. If the parameters are invalid, an * {@link IllegalArgumentException} is thrown. - * + * * @param timeToLive the constant amount of time an entry is available * before it expires. A negative value results in entries that NEVER * expire. A zero value results in entries that ALWAYS expire. @@ -216,7 +216,7 @@ public class PassiveExpiringMap /** * Construct a map decorator using the given expiration policy to determine * expiration times. - * + * * @param expiringPolicy the policy used to determine expiration times of * entries as they are added. */ @@ -229,7 +229,7 @@ public class PassiveExpiringMap * expiration policy to determine expiration times. If there are any * elements already in the map being decorated, they will NEVER expire * unless they are replaced. - * + * * @param expiringPolicy the policy used to determine expiration times of * entries as they are added. * @param map the map to decorate, must not be null. @@ -248,7 +248,7 @@ public class PassiveExpiringMap * Construct a map decorator that decorates the given map using the given * time-to-live value measured in milliseconds to create and use a * {@link ConstantTimeToLiveExpirationPolicy} expiration policy. - * + * * @param timeToLiveMillis the constant amount of time (in milliseconds) an * entry is available before it expires. A negative value results in * entries that NEVER expire. A zero value results in entries that @@ -265,7 +265,7 @@ public class PassiveExpiringMap * {@link ConstantTimeToLiveExpirationPolicy} expiration policy. If there * are any elements already in the map being decorated, they will NEVER * expire unless they are replaced. - * + * * @param timeToLiveMillis the constant amount of time (in milliseconds) an * entry is available before it expires. A negative value results in * entries that NEVER expire. A zero value results in entries that @@ -282,7 +282,7 @@ public class PassiveExpiringMap * Construct a map decorator using the given time-to-live value measured in * the given time units of measure to create and use a * {@link ConstantTimeToLiveExpirationPolicy} expiration policy. - * + * * @param timeToLive the constant amount of time an entry is available * before it expires. A negative value results in entries that NEVER * expire. A zero value results in entries that ALWAYS expire. @@ -301,7 +301,7 @@ public class PassiveExpiringMap * is used to determine expiration times. If there are any elements already * in the map being decorated, they will NEVER expire unless they are * replaced. - * + * * @param timeToLive the constant amount of time an entry is available * before it expires. A negative value results in entries that NEVER * expire. A zero value results in entries that ALWAYS expire. @@ -319,7 +319,7 @@ public class PassiveExpiringMap * Constructs a map decorator that decorates the given map and results in * entries NEVER expiring. If there are any elements already in the map * being decorated, they also will NEVER expire. - * + * * @param map the map to decorate, must not be null. * @throws IllegalArgumentException if the map is null. */ @@ -391,7 +391,7 @@ public class PassiveExpiringMap /** * Determines if the given expiration time is less than now. - * + * * @param now the time in milliseconds used to compare against the * expiration time. * @param expirationTimeObject the expiration time value retrieved from @@ -464,7 +464,7 @@ public class PassiveExpiringMap * Removes all entries in the map whose expiration time is less than * now. The exceptions are entries with negative expiration * times; those entries are never removed. - * + * * @see #isExpired(long, Long) */ private void removeAllExpired(final long now) { @@ -505,7 +505,7 @@ public class PassiveExpiringMap /** * Read the map in using a custom routine. - * + * * @param in the input stream * @throws IOException * @throws ClassNotFoundException @@ -520,7 +520,7 @@ public class PassiveExpiringMap /** * Write the map out using a custom routine. - * + * * @param out the output stream * @throws IOException */ diff --git a/src/main/java/org/apache/commons/collections4/map/PredicatedMap.java b/src/main/java/org/apache/commons/collections4/map/PredicatedMap.java index d717ace4e..ce1a85309 100644 --- a/src/main/java/org/apache/commons/collections4/map/PredicatedMap.java +++ b/src/main/java/org/apache/commons/collections4/map/PredicatedMap.java @@ -39,7 +39,7 @@ import org.apache.commons.collections4.Predicate; * Note that PredicatedMap is not synchronized and is not thread-safe. * If you wish to use this map from multiple threads concurrently, you must use * appropriate synchronization. The simplest approach is to wrap this map - * using {@link java.util.Collections#synchronizedMap(Map)}. This class may throw + * using {@link java.util.Collections#synchronizedMap(Map)}. This class may throw * exceptions when accessed by concurrent threads without synchronization. *

* This class is Serializable from Commons Collections 3.1. @@ -65,7 +65,7 @@ public class PredicatedMap *

* If there are any elements already in the list being decorated, they * are validated. - * + * * @param the key type * @param the value type * @param map the map to decorate, must not be null @@ -83,7 +83,7 @@ public class PredicatedMap //----------------------------------------------------------------------- /** * Constructor that wraps (not copies). - * + * * @param map the map to decorate, must not be null * @param keyPredicate the predicate to validate the keys, null means no check * @param valuePredicate the predicate to validate to values, null means no check @@ -94,7 +94,7 @@ public class PredicatedMap super(map); this.keyPredicate = keyPredicate; this.valuePredicate = valuePredicate; - + final Iterator> it = map.entrySet().iterator(); while (it.hasNext()) { final Map.Entry entry = it.next(); @@ -105,7 +105,7 @@ public class PredicatedMap //----------------------------------------------------------------------- /** * Write the map out using a custom routine. - * + * * @param out the output stream * @throws IOException * @since 3.1 @@ -117,13 +117,13 @@ public class PredicatedMap /** * Read the map in using a custom routine. - * + * * @param in the input stream * @throws IOException * @throws ClassNotFoundException * @since 3.1 */ - @SuppressWarnings("unchecked") // (1) should only fail if input stream is incorrect + @SuppressWarnings("unchecked") // (1) should only fail if input stream is incorrect private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); map = (Map) in.readObject(); // (1) @@ -132,7 +132,7 @@ public class PredicatedMap //----------------------------------------------------------------------- /** * Validates a key value pair. - * + * * @param key the key to validate * @param value the value to validate * @throws IllegalArgumentException if invalid @@ -148,7 +148,7 @@ public class PredicatedMap /** * Override to validate an object set into the map via setValue. - * + * * @param value the value to validate * @return the value itself * @throws IllegalArgumentException if invalid @@ -164,7 +164,7 @@ public class PredicatedMap /** * Override to only return true when there is a value transformer. - * + * * @return true if a value predicate is in use * @since 3.1 */ diff --git a/src/main/java/org/apache/commons/collections4/map/PredicatedSortedMap.java b/src/main/java/org/apache/commons/collections4/map/PredicatedSortedMap.java index e847bde4c..5091368d9 100644 --- a/src/main/java/org/apache/commons/collections4/map/PredicatedSortedMap.java +++ b/src/main/java/org/apache/commons/collections4/map/PredicatedSortedMap.java @@ -35,7 +35,7 @@ import org.apache.commons.collections4.Predicate; * Note that PredicatedSortedMap is not synchronized and is not thread-safe. * If you wish to use this map from multiple threads concurrently, you must use * appropriate synchronization. The simplest approach is to wrap this map - * using {@link java.util.Collections#synchronizedSortedMap}. This class may throw + * using {@link java.util.Collections#synchronizedSortedMap}. This class may throw * exceptions when accessed by concurrent threads without synchronization. *

* This class is Serializable from Commons Collections 3.1. @@ -53,7 +53,7 @@ public class PredicatedSortedMap extends PredicatedMap implements So *

* If there are any elements already in the list being decorated, they * are validated. - * + * * @param the key type * @param the value type * @param map the map to decorate, must not be null @@ -70,7 +70,7 @@ public class PredicatedSortedMap extends PredicatedMap implements So //----------------------------------------------------------------------- /** * Constructor that wraps (not copies). - * + * * @param map the map to decorate, must not be null * @param keyPredicate the predicate to validate the keys, null means no check * @param valuePredicate the predicate to validate to values, null means no check @@ -84,7 +84,7 @@ public class PredicatedSortedMap extends PredicatedMap implements So //----------------------------------------------------------------------- /** * Gets the map being decorated. - * + * * @return the decorated map */ protected SortedMap getSortedMap() { diff --git a/src/main/java/org/apache/commons/collections4/map/ReferenceIdentityMap.java b/src/main/java/org/apache/commons/collections4/map/ReferenceIdentityMap.java index d93d3ff46..976a16d1f 100644 --- a/src/main/java/org/apache/commons/collections4/map/ReferenceIdentityMap.java +++ b/src/main/java/org/apache/commons/collections4/map/ReferenceIdentityMap.java @@ -50,7 +50,7 @@ import java.lang.ref.Reference; * Attempting to add a null key or value to the map will raise a NullPointerException. *

* This implementation is not synchronized. - * You can use {@link java.util.Collections#synchronizedMap} to + * You can use {@link java.util.Collections#synchronizedMap} to * provide synchronized access to a ReferenceIdentityMap. * Remember that synchronization will not stop the garbage collector removing entries. *

@@ -60,7 +60,7 @@ import java.lang.ref.Reference; * Note that ReferenceIdentityMap is not synchronized and is not thread-safe. * If you wish to use this map from multiple threads concurrently, you must use * appropriate synchronization. The simplest approach is to wrap this map - * using {@link java.util.Collections#synchronizedMap}. This class may throw + * using {@link java.util.Collections#synchronizedMap}. This class may throw * exceptions when accessed by concurrent threads without synchronization. * * @see java.lang.ref.Reference @@ -87,8 +87,8 @@ public class ReferenceIdentityMap extends AbstractReferenceMap imple * use the specified types of references. * * @param keyType the type of reference to use for keys; - * must be {@link AbstractReferenceMap.ReferenceStrength#HARD HARD}, - * {@link AbstractReferenceMap.ReferenceStrength#SOFT SOFT}, + * must be {@link AbstractReferenceMap.ReferenceStrength#HARD HARD}, + * {@link AbstractReferenceMap.ReferenceStrength#SOFT SOFT}, * {@link AbstractReferenceMap.ReferenceStrength#WEAK WEAK} * @param valueType the type of reference to use for values; * must be {@link AbstractReferenceMap.ReferenceStrength#HARD HARD}, @@ -104,15 +104,15 @@ public class ReferenceIdentityMap extends AbstractReferenceMap imple * use the specified types of references. * * @param keyType the type of reference to use for keys; - * must be {@link AbstractReferenceMap.ReferenceStrength#HARD HARD}, - * {@link AbstractReferenceMap.ReferenceStrength#SOFT SOFT}, + * must be {@link AbstractReferenceMap.ReferenceStrength#HARD HARD}, + * {@link AbstractReferenceMap.ReferenceStrength#SOFT SOFT}, * {@link AbstractReferenceMap.ReferenceStrength#WEAK WEAK} * @param valueType the type of reference to use for values; * must be {@link AbstractReferenceMap.ReferenceStrength#HARD HARD}, * {@link AbstractReferenceMap.ReferenceStrength#SOFT SOFT}, * {@link AbstractReferenceMap.ReferenceStrength#WEAK WEAK} - * @param purgeValues should the value be automatically purged when the - * key is garbage collected + * @param purgeValues should the value be automatically purged when the + * key is garbage collected */ public ReferenceIdentityMap(final ReferenceStrength keyType, final ReferenceStrength valueType, final boolean purgeValues) { @@ -124,8 +124,8 @@ public class ReferenceIdentityMap extends AbstractReferenceMap imple * specified reference types, load factor and initial capacity. * * @param keyType the type of reference to use for keys; - * must be {@link AbstractReferenceMap.ReferenceStrength#HARD HARD}, - * {@link AbstractReferenceMap.ReferenceStrength#SOFT SOFT}, + * must be {@link AbstractReferenceMap.ReferenceStrength#HARD HARD}, + * {@link AbstractReferenceMap.ReferenceStrength#SOFT SOFT}, * {@link AbstractReferenceMap.ReferenceStrength#WEAK WEAK} * @param valueType the type of reference to use for values; * must be {@link AbstractReferenceMap.ReferenceStrength#HARD HARD}, @@ -144,8 +144,8 @@ public class ReferenceIdentityMap extends AbstractReferenceMap imple * specified reference types, load factor and initial capacity. * * @param keyType the type of reference to use for keys; - * must be {@link AbstractReferenceMap.ReferenceStrength#HARD HARD}, - * {@link AbstractReferenceMap.ReferenceStrength#SOFT SOFT}, + * must be {@link AbstractReferenceMap.ReferenceStrength#HARD HARD}, + * {@link AbstractReferenceMap.ReferenceStrength#SOFT SOFT}, * {@link AbstractReferenceMap.ReferenceStrength#WEAK WEAK} * @param valueType the type of reference to use for values; * must be {@link AbstractReferenceMap.ReferenceStrength#HARD HARD}, @@ -153,8 +153,8 @@ public class ReferenceIdentityMap extends AbstractReferenceMap imple * {@link AbstractReferenceMap.ReferenceStrength#WEAK WEAK} * @param capacity the initial capacity for the map * @param loadFactor the load factor for the map - * @param purgeValues should the value be automatically purged when the - * key is garbage collected + * @param purgeValues should the value be automatically purged when the + * key is garbage collected */ public ReferenceIdentityMap(final ReferenceStrength keyType, final ReferenceStrength valueType, final int capacity, final float loadFactor, final boolean purgeValues) { @@ -166,7 +166,7 @@ public class ReferenceIdentityMap extends AbstractReferenceMap imple * Gets the hash code for the key specified. *

* This implementation uses the identity hash code. - * + * * @param key the key to get a hash code for * @return the hash code */ @@ -179,7 +179,7 @@ public class ReferenceIdentityMap extends AbstractReferenceMap imple * Gets the hash code for a MapEntry. *

* This implementation uses the identity hash code. - * + * * @param key the key to get a hash code for, may be null * @param value the value to get a hash code for, may be null * @return the hash code, as per the MapEntry specification @@ -195,7 +195,7 @@ public class ReferenceIdentityMap extends AbstractReferenceMap imple *

* This implementation converts the key from the entry to a real reference * before comparison and uses ==. - * + * * @param key1 the first key to compare passed in from outside * @param key2 the second key extracted from the entry via entry.key * @return true if equal by identity @@ -210,7 +210,7 @@ public class ReferenceIdentityMap extends AbstractReferenceMap imple * Compares two values for equals. *

* This implementation uses ==. - * + * * @param value1 the first value to compare passed in from outside * @param value2 the second value extracted from the entry via getValue() * @return true if equal by identity diff --git a/src/main/java/org/apache/commons/collections4/map/ReferenceMap.java b/src/main/java/org/apache/commons/collections4/map/ReferenceMap.java index 4b647b4c3..af5e0cea5 100644 --- a/src/main/java/org/apache/commons/collections4/map/ReferenceMap.java +++ b/src/main/java/org/apache/commons/collections4/map/ReferenceMap.java @@ -48,7 +48,7 @@ import java.io.Serializable; * Attempting to add a null key or value to the map will raise a NullPointerException. *

* This implementation is not synchronized. - * You can use {@link java.util.Collections#synchronizedMap} to + * You can use {@link java.util.Collections#synchronizedMap} to * provide synchronized access to a ReferenceMap. * Remember that synchronization will not stop the garbage collector removing entries. *

@@ -58,7 +58,7 @@ import java.io.Serializable; * Note that ReferenceMap is not synchronized and is not thread-safe. * If you wish to use this map from multiple threads concurrently, you must use * appropriate synchronization. The simplest approach is to wrap this map - * using {@link java.util.Collections#synchronizedMap}. This class may throw + * using {@link java.util.Collections#synchronizedMap}. This class may throw * exceptions when accessed by concurrent threads without synchronization. *

* NOTE: As from Commons Collections 3.1 this map extends AbstractReferenceMap @@ -89,8 +89,8 @@ public class ReferenceMap extends AbstractReferenceMap implements Se * use the specified types of references. * * @param keyType the type of reference to use for keys; - * must be {@link AbstractReferenceMap.ReferenceStrength#HARD HARD}, - * {@link AbstractReferenceMap.ReferenceStrength#SOFT SOFT}, + * must be {@link AbstractReferenceMap.ReferenceStrength#HARD HARD}, + * {@link AbstractReferenceMap.ReferenceStrength#SOFT SOFT}, * {@link AbstractReferenceMap.ReferenceStrength#WEAK WEAK} * @param valueType the type of reference to use for values; * must be {@link AbstractReferenceMap.ReferenceStrength#HARD HARD}, @@ -106,15 +106,15 @@ public class ReferenceMap extends AbstractReferenceMap implements Se * use the specified types of references. * * @param keyType the type of reference to use for keys; - * must be {@link AbstractReferenceMap.ReferenceStrength#HARD HARD}, - * {@link AbstractReferenceMap.ReferenceStrength#SOFT SOFT}, + * must be {@link AbstractReferenceMap.ReferenceStrength#HARD HARD}, + * {@link AbstractReferenceMap.ReferenceStrength#SOFT SOFT}, * {@link AbstractReferenceMap.ReferenceStrength#WEAK WEAK} * @param valueType the type of reference to use for values; * must be {@link AbstractReferenceMap.ReferenceStrength#HARD HARD}, * {@link AbstractReferenceMap.ReferenceStrength#SOFT SOFT}, * {@link AbstractReferenceMap.ReferenceStrength#WEAK WEAK} - * @param purgeValues should the value be automatically purged when the - * key is garbage collected + * @param purgeValues should the value be automatically purged when the + * key is garbage collected */ public ReferenceMap(final ReferenceStrength keyType, final ReferenceStrength valueType, final boolean purgeValues) { super(keyType, valueType, DEFAULT_CAPACITY, DEFAULT_LOAD_FACTOR, purgeValues); @@ -126,8 +126,8 @@ public class ReferenceMap extends AbstractReferenceMap implements Se * capacity. * * @param keyType the type of reference to use for keys; - * must be {@link AbstractReferenceMap.ReferenceStrength#HARD HARD}, - * {@link AbstractReferenceMap.ReferenceStrength#SOFT SOFT}, + * must be {@link AbstractReferenceMap.ReferenceStrength#HARD HARD}, + * {@link AbstractReferenceMap.ReferenceStrength#SOFT SOFT}, * {@link AbstractReferenceMap.ReferenceStrength#WEAK WEAK} * @param valueType the type of reference to use for values; * must be {@link AbstractReferenceMap.ReferenceStrength#HARD HARD}, @@ -147,8 +147,8 @@ public class ReferenceMap extends AbstractReferenceMap implements Se * capacity. * * @param keyType the type of reference to use for keys; - * must be {@link AbstractReferenceMap.ReferenceStrength#HARD HARD}, - * {@link AbstractReferenceMap.ReferenceStrength#SOFT SOFT}, + * must be {@link AbstractReferenceMap.ReferenceStrength#HARD HARD}, + * {@link AbstractReferenceMap.ReferenceStrength#SOFT SOFT}, * {@link AbstractReferenceMap.ReferenceStrength#WEAK WEAK} * @param valueType the type of reference to use for values; * must be {@link AbstractReferenceMap.ReferenceStrength#HARD HARD}, @@ -156,8 +156,8 @@ public class ReferenceMap extends AbstractReferenceMap implements Se * {@link AbstractReferenceMap.ReferenceStrength#WEAK WEAK} * @param capacity the initial capacity for the map * @param loadFactor the load factor for the map - * @param purgeValues should the value be automatically purged when the - * key is garbage collected + * @param purgeValues should the value be automatically purged when the + * key is garbage collected */ public ReferenceMap(final ReferenceStrength keyType, final ReferenceStrength valueType, final int capacity, final float loadFactor, final boolean purgeValues) { diff --git a/src/main/java/org/apache/commons/collections4/map/SingletonMap.java b/src/main/java/org/apache/commons/collections4/map/SingletonMap.java index 554aee4d7..6fd8ad463 100644 --- a/src/main/java/org/apache/commons/collections4/map/SingletonMap.java +++ b/src/main/java/org/apache/commons/collections4/map/SingletonMap.java @@ -43,7 +43,7 @@ import org.apache.commons.collections4.keyvalue.TiedMapEntry; *

* If trying to remove or clear the map, an UnsupportedOperationException is thrown. * If trying to put a new mapping into the map, an IllegalArgumentException is thrown. - * The put method will only suceed if the key specified is the same as the + * The put method will only suceed if the key specified is the same as the * singleton key. *

* The key and value can be obtained by: @@ -131,7 +131,7 @@ public class SingletonMap /** * Gets the key. * - * @return the key + * @return the key */ public K getKey() { return key; @@ -171,7 +171,7 @@ public class SingletonMap /** * Gets the maximum size of the map, always 1. - * + * * @return 1 always */ public int maxSize() { @@ -182,7 +182,7 @@ public class SingletonMap //----------------------------------------------------------------------- /** * Gets the value mapped to the key specified. - * + * * @param key the key * @return the mapped value, null if no match */ @@ -195,7 +195,7 @@ public class SingletonMap /** * Gets the size of the map, always 1. - * + * * @return the size of 1 */ public int size() { @@ -204,7 +204,7 @@ public class SingletonMap /** * Checks whether the map is currently empty, which it never is. - * + * * @return false always */ public boolean isEmpty() { @@ -214,7 +214,7 @@ public class SingletonMap //----------------------------------------------------------------------- /** * Checks whether the map contains the specified key. - * + * * @param key the key to search for * @return true if the map contains the key */ @@ -224,7 +224,7 @@ public class SingletonMap /** * Checks whether the map contains the specified value. - * + * * @param value the value to search for * @return true if the map contains the key */ @@ -238,7 +238,7 @@ public class SingletonMap *

* An IllegalArgumentException is thrown if the key does not match as the map * is fixed size. - * + * * @param key the key to set, must be the key of the map * @param value the value to set * @return the value previously mapped to this key, null if none @@ -257,7 +257,7 @@ public class SingletonMap * The map must be of size 0 or size 1. * If it is size 1, the key must match the key of this map otherwise an * IllegalArgumentException is thrown. - * + * * @param map the map to add, must be size 0 or 1, and the key must match * @throws NullPointerException if the map is null * @throws IllegalArgumentException if the key does not match @@ -276,10 +276,10 @@ public class SingletonMap throw new IllegalArgumentException("The map size must be 0 or 1"); } } - + /** * Unsupported operation. - * + * * @param key the mapping to remove * @return the value mapped to the removed key, null if key not in map * @throws UnsupportedOperationException always @@ -300,19 +300,19 @@ public class SingletonMap * Gets the entrySet view of the map. * Changes made via setValue affect this map. * To simply iterate through the entries, use {@link #mapIterator()}. - * + * * @return the entrySet view */ public Set> entrySet() { final Map.Entry entry = new TiedMapEntry(this, getKey()); return Collections.singleton(entry); } - + /** * Gets the unmodifiable keySet view of the map. * Changes made to the view affect this map. * To simply iterate through the keys, use {@link #mapIterator()}. - * + * * @return the keySet view */ public Set keySet() { @@ -323,7 +323,7 @@ public class SingletonMap * Gets the unmodifiable values view of the map. * Changes made to the view affect this map. * To simply iterate through the values, use {@link #mapIterator()}. - * + * * @return the values view */ public Collection values() { @@ -339,7 +339,7 @@ public class SingletonMap /** * Gets the first (and only) key in the map. - * + * * @return the key */ public K firstKey() { @@ -348,7 +348,7 @@ public class SingletonMap /** * Gets the last (and only) key in the map. - * + * * @return the key */ public K lastKey() { @@ -357,7 +357,7 @@ public class SingletonMap /** * Gets the next key after the key specified, always null. - * + * * @param key the next key * @return null always */ @@ -367,7 +367,7 @@ public class SingletonMap /** * Gets the previous key before the key specified, always null. - * + * * @param key the next key * @return null always */ @@ -378,7 +378,7 @@ public class SingletonMap //----------------------------------------------------------------------- /** * Compares the specified key to the stored key. - * + * * @param key the key to compare * @return true if equal */ @@ -388,7 +388,7 @@ public class SingletonMap /** * Compares the specified value to the stored value. - * + * * @param value the value to compare * @return true if equal */ @@ -404,7 +404,7 @@ public class SingletonMap private final SingletonMap parent; private boolean hasNext = true; private boolean canGetSet = false; - + SingletonMapIterator(final SingletonMap parent) { super(); this.parent = parent; @@ -459,11 +459,11 @@ public class SingletonMap } return parent.setValue(value); } - + public void reset() { hasNext = true; } - + @Override public String toString() { if (hasNext) { @@ -472,7 +472,7 @@ public class SingletonMap return "Iterator[" + getKey() + "=" + getValue() + "]"; } } - + /** * Values implementation for the SingletonMap. * This class is needed as values is a view that must update as the map updates. @@ -507,7 +507,7 @@ public class SingletonMap return new SingletonIterator(parent.getValue(), false); } } - + //----------------------------------------------------------------------- /** * Clones the map without cloning the key or value. @@ -526,7 +526,7 @@ public class SingletonMap /** * Compares this map with another. - * + * * @param obj the object to compare to * @return true if equal */ @@ -548,18 +548,18 @@ public class SingletonMap /** * Gets the standard Map hashCode. - * + * * @return the hash code defined in the Map interface */ @Override public int hashCode() { return (getKey() == null ? 0 : getKey().hashCode()) ^ - (getValue() == null ? 0 : getValue().hashCode()); + (getValue() == null ? 0 : getValue().hashCode()); } /** * Gets the map as a String. - * + * * @return a string version of the map */ @Override diff --git a/src/main/java/org/apache/commons/collections4/map/StaticBucketMap.java b/src/main/java/org/apache/commons/collections4/map/StaticBucketMap.java index 0dd9e7796..7921e711d 100644 --- a/src/main/java/org/apache/commons/collections4/map/StaticBucketMap.java +++ b/src/main/java/org/apache/commons/collections4/map/StaticBucketMap.java @@ -31,7 +31,7 @@ import org.apache.commons.collections4.KeyValue; * A StaticBucketMap is an efficient, thread-safe implementation of * java.util.Map that performs well in in a highly * thread-contentious environment. The map supports very efficient - * {@link #get(Object) get}, {@link #put(Object,Object) put}, + * {@link #get(Object) get}, {@link #put(Object,Object) put}, * {@link #remove(Object) remove} and {@link #containsKey(Object) containsKey} * operations, assuming (approximate) uniform hashing and * that the number of entries does not exceed the number of buckets. If the @@ -40,16 +40,16 @@ import org.apache.commons.collections4.KeyValue; * scenario that is proportional to the number of elements in the map * (O(n)).

* - * Each bucket in the hash table has its own monitor, so two threads can - * safely operate on the map at the same time, often without incurring any + * Each bucket in the hash table has its own monitor, so two threads can + * safely operate on the map at the same time, often without incurring any * monitor contention. This means that you don't have to wrap instances * of this class with {@link java.util.Collections#synchronizedMap(Map)}; - * instances are already thread-safe. Unfortunately, however, this means - * that this map implementation behaves in ways you may find disconcerting. + * instances are already thread-safe. Unfortunately, however, this means + * that this map implementation behaves in ways you may find disconcerting. * Bulk operations, such as {@link #putAll(Map) putAll} or the - * {@link Collection#retainAll(Collection) retainAll} operation in collection - * views, are not atomic. If two threads are simultaneously - * executing + * {@link Collection#retainAll(Collection) retainAll} operation in collection + * views, are not atomic. If two threads are simultaneously + * executing * *

  *   staticBucketMapInstance.putAll(map);
@@ -62,23 +62,23 @@ import org.apache.commons.collections4.KeyValue;
  * 
* * then the results are generally random. Those two statement could cancel - * each other out, leaving staticBucketMapInstance essentially - * unchanged, or they could leave some random subset of map in + * each other out, leaving staticBucketMapInstance essentially + * unchanged, or they could leave some random subset of map in * staticBucketMapInstance.

* - * Also, much like an encyclopedia, the results of {@link #size()} and + * Also, much like an encyclopedia, the results of {@link #size()} and * {@link #isEmpty()} are out-of-date as soon as they are produced.

* * The iterators returned by the collection views of this class are not - * fail-fast. They will never raise a - * {@link java.util.ConcurrentModificationException}. Keys and values + * fail-fast. They will never raise a + * {@link java.util.ConcurrentModificationException}. Keys and values * added to the map after the iterator is created do not necessarily appear - * during iteration. Similarly, the iterator does not necessarily fail to + * during iteration. Similarly, the iterator does not necessarily fail to * return keys and values that were removed after the iterator was created.

* * Finally, unlike {@link java.util.HashMap}-style implementations, this - * class never rehashes the map. The number of buckets is fixed - * at construction time and never altered. Performance may degrade if + * class never rehashes the map. The number of buckets is fixed + * at construction time and never altered. Performance may degrade if * you do not allocate enough buckets upfront.

* * The {@link #atomic(Runnable)} method is provided to allow atomic iterations @@ -86,8 +86,8 @@ import org.apache.commons.collections4.KeyValue; * will basically result in a map that's slower than an ordinary synchronized * {@link java.util.HashMap}. * - * Use this class if you do not require reliable bulk operations and - * iterations, or if you can make your own guarantees about how bulk + * Use this class if you do not require reliable bulk operations and + * iterations, or if you can make your own guarantees about how bulk * operations will affect the map.

* * @since 3.0 (previously in main package v2.1) @@ -168,7 +168,7 @@ public final class StaticBucketMap extends AbstractIterableMap { /** * Gets the current size of the map. * The value is computed fresh each time the method is called. - * + * * @return the current size */ public int size() { @@ -184,7 +184,7 @@ public final class StaticBucketMap extends AbstractIterableMap { /** * Checks if the size is currently zero. - * + * * @return true if empty */ public boolean isEmpty() { @@ -193,7 +193,7 @@ public final class StaticBucketMap extends AbstractIterableMap { /** * Gets the value associated with the key. - * + * * @param key the key to retrieve * @return the associated value */ @@ -216,7 +216,7 @@ public final class StaticBucketMap extends AbstractIterableMap { /** * Checks if the map contains the specified key. - * + * * @param key the key to check * @return true if found */ @@ -239,7 +239,7 @@ public final class StaticBucketMap extends AbstractIterableMap { /** * Checks if the map contains the specified value. - * + * * @param value the value to check * @return true if found */ @@ -263,7 +263,7 @@ public final class StaticBucketMap extends AbstractIterableMap { //----------------------------------------------------------------------- /** * Puts a new key value mapping into the map. - * + * * @param key the key to use * @param value the value to use * @return the previous mapping for the key @@ -309,7 +309,7 @@ public final class StaticBucketMap extends AbstractIterableMap { /** * Removes the specified key from the map. - * + * * @param key the key to remove * @return the previous value at this key */ @@ -344,7 +344,7 @@ public final class StaticBucketMap extends AbstractIterableMap { //----------------------------------------------------------------------- /** * Gets the key set. - * + * * @return the key set */ public Set keySet() { @@ -353,7 +353,7 @@ public final class StaticBucketMap extends AbstractIterableMap { /** * Gets the values. - * + * * @return the values */ public Collection values() { @@ -362,7 +362,7 @@ public final class StaticBucketMap extends AbstractIterableMap { /** * Gets the entry set. - * + * * @return the entry set */ public Set> entrySet() { @@ -373,7 +373,7 @@ public final class StaticBucketMap extends AbstractIterableMap { /** * Puts all the entries from the specified map into this map. * This operation is not atomic and may have undesired effects. - * + * * @param map the map of entries to add */ public void putAll(final Map map) { @@ -397,7 +397,7 @@ public final class StaticBucketMap extends AbstractIterableMap { /** * Compares this map to another, as per the Map specification. - * + * * @param obj the object to compare to * @return true if equal */ @@ -415,7 +415,7 @@ public final class StaticBucketMap extends AbstractIterableMap { /** * Gets the hash code, as per the Map specification. - * + * * @return the hash code */ @Override @@ -667,7 +667,7 @@ public final class StaticBucketMap extends AbstractIterableMap { /** * Prevents any operations from occurring on this map while the * given {@link Runnable} executes. This method can be used, for - * instance, to execute a bulk operation atomically: + * instance, to execute a bulk operation atomically: * *

      *    staticBucketMapInstance.atomic(new Runnable() {
diff --git a/src/main/java/org/apache/commons/collections4/map/TransformedMap.java b/src/main/java/org/apache/commons/collections4/map/TransformedMap.java
index 20cb51872..50f6f5d14 100644
--- a/src/main/java/org/apache/commons/collections4/map/TransformedMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/TransformedMap.java
@@ -147,7 +147,7 @@ public class TransformedMap
      * @throws ClassNotFoundException
      * @since 3.1
      */
-    @SuppressWarnings("unchecked") // (1) should only fail if input stream is incorrect 
+    @SuppressWarnings("unchecked") // (1) should only fail if input stream is incorrect
     private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException {
         in.defaultReadObject();
         map = (Map) in.readObject(); // (1)
diff --git a/src/main/java/org/apache/commons/collections4/map/TransformedSortedMap.java b/src/main/java/org/apache/commons/collections4/map/TransformedSortedMap.java
index d42eecd29..79fa409a9 100644
--- a/src/main/java/org/apache/commons/collections4/map/TransformedSortedMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/TransformedSortedMap.java
@@ -33,7 +33,7 @@ import org.apache.commons.collections4.Transformer;
  * Note that TransformedSortedMap is not synchronized and is not thread-safe.
  * If you wish to use this map from multiple threads concurrently, you must use
  * appropriate synchronization. The simplest approach is to wrap this map
- * using {@link java.util.Collections#synchronizedSortedMap}. This class may throw 
+ * using {@link java.util.Collections#synchronizedSortedMap}. This class may throw
  * exceptions when accessed by concurrent threads without synchronization.
  * 

* This class is Serializable from Commons Collections 3.1. @@ -47,13 +47,13 @@ public class TransformedSortedMap /** Serialization version */ private static final long serialVersionUID = -8751771676410385778L; - + /** * Factory method to create a transforming sorted map. *

* If there are any elements already in the map being decorated, they are NOT transformed. * Contrast this with {@link #transformedSortedMap(SortedMap, Transformer, Transformer)}. - * + * * @param the key type * @param the value type * @param map the map to decorate, must not be null @@ -75,7 +75,7 @@ public class TransformedSortedMap * If there are any elements already in the map being decorated, they * will be transformed by this method. * Contrast this with {@link #transformingSortedMap(SortedMap, Transformer, Transformer)}. - * + * * @param the key type * @param the value type * @param map the map to decorate, must not be null @@ -105,7 +105,7 @@ public class TransformedSortedMap *

* If there are any elements already in the collection being decorated, they * are NOT transformed.

- * + * * @param map the map to decorate, must not be null * @param keyTransformer the predicate to validate the keys, null means no transformation * @param valueTransformer the predicate to validate to values, null means no transformation @@ -120,7 +120,7 @@ public class TransformedSortedMap //----------------------------------------------------------------------- /** * Gets the map being decorated. - * + * * @return the decorated map */ protected SortedMap getSortedMap() { diff --git a/src/main/java/org/apache/commons/collections4/map/UnmodifiableEntrySet.java b/src/main/java/org/apache/commons/collections4/map/UnmodifiableEntrySet.java index 93d0f6672..196425238 100644 --- a/src/main/java/org/apache/commons/collections4/map/UnmodifiableEntrySet.java +++ b/src/main/java/org/apache/commons/collections4/map/UnmodifiableEntrySet.java @@ -30,7 +30,7 @@ import org.apache.commons.collections4.keyvalue.AbstractMapEntryDecorator; /** * Decorates a map entry Set to ensure it can't be altered. *

- * Attempts to modify it will result in an UnsupportedOperationException. + * Attempts to modify it will result in an UnsupportedOperationException. * * @since 3.0 * @version $Id$ @@ -43,7 +43,7 @@ public final class UnmodifiableEntrySet /** * Factory method to create an unmodifiable set of Map Entry objects. - * + * * @param the key type * @param the value type * @param set the set to decorate, must not be null @@ -60,7 +60,7 @@ public final class UnmodifiableEntrySet //----------------------------------------------------------------------- /** * Constructor that wraps (not copies). - * + * * @param set the set to decorate, must not be null * @throws IllegalArgumentException if set is null */ @@ -104,7 +104,7 @@ public final class UnmodifiableEntrySet public Iterator> iterator() { return new UnmodifiableEntrySetIterator(collection.iterator()); } - + @Override @SuppressWarnings("unchecked") public Object[] toArray() { @@ -114,7 +114,7 @@ public final class UnmodifiableEntrySet } return array; } - + @Override @SuppressWarnings("unchecked") public T[] toArray(final T[] array) { @@ -141,7 +141,7 @@ public final class UnmodifiableEntrySet } return array; } - + //----------------------------------------------------------------------- /** * Implementation of an entry set iterator. diff --git a/src/main/java/org/apache/commons/collections4/map/UnmodifiableMap.java b/src/main/java/org/apache/commons/collections4/map/UnmodifiableMap.java index e29d2bb4e..2dc9f324c 100644 --- a/src/main/java/org/apache/commons/collections4/map/UnmodifiableMap.java +++ b/src/main/java/org/apache/commons/collections4/map/UnmodifiableMap.java @@ -37,7 +37,7 @@ import org.apache.commons.collections4.iterators.UnmodifiableMapIterator; *

* This class is Serializable from Commons Collections 3.1. *

- * Attempts to modify it will result in an UnsupportedOperationException. + * Attempts to modify it will result in an UnsupportedOperationException. * * @since 3.0 * @version $Id$ @@ -51,7 +51,7 @@ public final class UnmodifiableMap /** * Factory method to create an unmodifiable map. - * + * * @param the key type * @param the value type * @param map the map to decorate, must not be null @@ -68,7 +68,7 @@ public final class UnmodifiableMap //----------------------------------------------------------------------- /** * Constructor that wraps (not copies). - * + * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if map is null */ @@ -79,7 +79,7 @@ public final class UnmodifiableMap //----------------------------------------------------------------------- /** * Write the map out using a custom routine. - * + * * @param out the output stream * @throws IOException * @since 3.1 @@ -91,7 +91,7 @@ public final class UnmodifiableMap /** * Read the map in using a custom routine. - * + * * @param in the input stream * @throws IOException * @throws ClassNotFoundException diff --git a/src/main/java/org/apache/commons/collections4/map/UnmodifiableOrderedMap.java b/src/main/java/org/apache/commons/collections4/map/UnmodifiableOrderedMap.java index ea7a6c889..22c94057b 100644 --- a/src/main/java/org/apache/commons/collections4/map/UnmodifiableOrderedMap.java +++ b/src/main/java/org/apache/commons/collections4/map/UnmodifiableOrderedMap.java @@ -36,7 +36,7 @@ import org.apache.commons.collections4.iterators.UnmodifiableOrderedMapIterator; *

* This class is Serializable from Commons Collections 3.1. *

- * Attempts to modify it will result in an UnsupportedOperationException. + * Attempts to modify it will result in an UnsupportedOperationException. * * @since 3.0 * @version $Id$ @@ -49,7 +49,7 @@ public final class UnmodifiableOrderedMap extends AbstractOrderedMapDecora /** * Factory method to create an unmodifiable sorted map. - * + * * @param the key type * @param the value type * @param map the map to decorate, must not be null @@ -66,7 +66,7 @@ public final class UnmodifiableOrderedMap extends AbstractOrderedMapDecora //----------------------------------------------------------------------- /** * Constructor that wraps (not copies). - * + * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if map is null */ @@ -77,7 +77,7 @@ public final class UnmodifiableOrderedMap extends AbstractOrderedMapDecora //----------------------------------------------------------------------- /** * Write the map out using a custom routine. - * + * * @param out the output stream * @throws IOException * @since 3.1 @@ -89,13 +89,13 @@ public final class UnmodifiableOrderedMap extends AbstractOrderedMapDecora /** * Read the map in using a custom routine. - * + * * @param in the input stream * @throws IOException * @throws ClassNotFoundException * @since 3.1 */ - @SuppressWarnings("unchecked") // (1) should only fail if input stream is incorrect + @SuppressWarnings("unchecked") // (1) should only fail if input stream is incorrect private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); map = (Map) in.readObject(); // (1) diff --git a/src/main/java/org/apache/commons/collections4/map/UnmodifiableSortedMap.java b/src/main/java/org/apache/commons/collections4/map/UnmodifiableSortedMap.java index af6b14668..dfc48d7b5 100644 --- a/src/main/java/org/apache/commons/collections4/map/UnmodifiableSortedMap.java +++ b/src/main/java/org/apache/commons/collections4/map/UnmodifiableSortedMap.java @@ -35,7 +35,7 @@ import org.apache.commons.collections4.collection.UnmodifiableCollection; *

* This class is Serializable from Commons Collections 3.1. *

- * Attempts to modify it will result in an UnsupportedOperationException. + * Attempts to modify it will result in an UnsupportedOperationException. * * @since 3.0 * @version $Id$ @@ -49,7 +49,7 @@ public final class UnmodifiableSortedMap /** * Factory method to create an unmodifiable sorted map. - * + * * @param the key type * @param the value type * @param map the map to decorate, must not be null @@ -66,18 +66,18 @@ public final class UnmodifiableSortedMap //----------------------------------------------------------------------- /** * Constructor that wraps (not copies). - * + * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if map is null */ private UnmodifiableSortedMap(final SortedMap map) { super(map); } - + //----------------------------------------------------------------------- /** * Write the map out using a custom routine. - * + * * @param out the output stream * @throws IOException * @since 3.1 @@ -89,7 +89,7 @@ public final class UnmodifiableSortedMap /** * Read the map in using a custom routine. - * + * * @param in the input stream * @throws IOException * @throws ClassNotFoundException