You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tn...@apache.org on 2012/09/07 22:53:10 UTC
svn commit: r1382169 -
/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/
Author: tn
Date: Fri Sep 7 20:53:09 2012
New Revision: 1382169
URL: http://svn.apache.org/viewvc?rev=1382169&view=rev
Log:
Javadoc fixes.
Modified:
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/CompositeMap.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/DefaultedMap.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/FixedSizeMap.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/FixedSizeSortedMap.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/LRUMap.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/LazyMap.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/LazySortedMap.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/ListOrderedMap.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/MultiKeyMap.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/MultiValueMap.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/PassiveExpiringMap.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/PredicatedMap.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/PredicatedSortedMap.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/TransformedMap.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/TransformedSortedMap.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/UnmodifiableEntrySet.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/UnmodifiableMap.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/UnmodifiableOrderedMap.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/UnmodifiableSortedMap.java
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/CompositeMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/CompositeMap.java?rev=1382169&r1=1382168&r2=1382169&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/CompositeMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/CompositeMap.java Fri Sep 7 20:53:09 2012
@@ -472,6 +472,7 @@ public class CompositeMap<K, V> extends
/**
* Gets a hash code for the Map as per the Map specification.
+ * {@inheritDoc}
*/
@Override
public int hashCode() {
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/DefaultedMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/DefaultedMap.java?rev=1382169&r1=1382168&r2=1382169&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/DefaultedMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/DefaultedMap.java Fri Sep 7 20:53:09 2012
@@ -75,6 +75,8 @@ public class DefaultedMap<K, V> extends
* <p>
* The value specified is returned when a missing key is found.
*
+ * @param <K> the key type
+ * @param <V> the value type
* @param map the map to decorate, must not be null
* @param defaultValue the default value to return when the key is not found
* @return a new defaulting map
@@ -90,6 +92,8 @@ public class DefaultedMap<K, V> extends
* 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 <K> the key type
+ * @param <V> the value type
* @param map the map to decorate, must not be null
* @param factory the factory to use to create entries, must not be null
* @return a new defaulting map
@@ -109,6 +113,8 @@ public class DefaultedMap<K, V> extends
* 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 <K> the key type
+ * @param <V> the value type
* @param map the map to decorate, must not be null
* @param transformer the transformer to use as a factory to create entries, must not be null
* @return a new defaulting map
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/FixedSizeMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/FixedSizeMap.java?rev=1382169&r1=1382168&r2=1382169&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/FixedSizeMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/FixedSizeMap.java Fri Sep 7 20:53:09 2012
@@ -62,6 +62,8 @@ public class FixedSizeMap<K, V>
/**
* Factory method to create a fixed size map.
*
+ * @param <K> the key type
+ * @param <V> the value type
* @param map the map to decorate, must not be null
* @return a new fixed size map
* @throws IllegalArgumentException if map is null
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/FixedSizeSortedMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/FixedSizeSortedMap.java?rev=1382169&r1=1382168&r2=1382169&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/FixedSizeSortedMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/FixedSizeSortedMap.java Fri Sep 7 20:53:09 2012
@@ -64,6 +64,8 @@ public class FixedSizeSortedMap<K, V>
/**
* Factory method to create a fixed size sorted map.
*
+ * @param <K> the key type
+ * @param <V> the value type
* @param map the map to decorate, must not be null
* @return a new fixed size sorted map
* @throws IllegalArgumentException if map is null
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/LRUMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/LRUMap.java?rev=1382169&r1=1382168&r2=1382169&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/LRUMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/LRUMap.java Fri Sep 7 20:53:09 2012
@@ -360,6 +360,7 @@ public class LRUMap<K, V>
* This is fixed in version 3.1 onwards.
*
* @param entry the entry to be removed
+ * @return {@code true}
*/
protected boolean removeLRU(LinkEntry<K, V> entry) {
return true;
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/LazyMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/LazyMap.java?rev=1382169&r1=1382168&r2=1382169&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/LazyMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/LazyMap.java Fri Sep 7 20:53:09 2012
@@ -70,6 +70,8 @@ public class LazyMap<K, V> extends Abstr
/**
* Factory method to create a lazily instantiated map.
*
+ * @param <K> the key type
+ * @param <V> the value type
* @param map the map to decorate, must not be null
* @param factory the factory to use, must not be null
* @return a new lazy map
@@ -82,6 +84,8 @@ public class LazyMap<K, V> extends Abstr
/**
* Factory method to create a lazily instantiated map.
*
+ * @param <K> the key type
+ * @param <V> the value type
* @param map the map to decorate, must not be null
* @param factory the factory to use, must not be null
* @return a new lazy map
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/LazySortedMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/LazySortedMap.java?rev=1382169&r1=1382168&r2=1382169&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/LazySortedMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/LazySortedMap.java Fri Sep 7 20:53:09 2012
@@ -66,8 +66,11 @@ public class LazySortedMap<K,V>
/**
* Factory method to create a lazily instantiated sorted map.
*
+ * @param <K> the key type
+ * @param <V> the value type
* @param map the map to decorate, must not be null
* @param factory the factory to use, must not be null
+ * @return a new lazy sorted map
* @throws IllegalArgumentException if map or factory is null
*/
public static <K, V> LazySortedMap<K, V> lazySortedMap(SortedMap<K, V> map, Factory<? extends V> factory) {
@@ -77,8 +80,11 @@ public class LazySortedMap<K,V>
/**
* Factory method to create a lazily instantiated sorted map.
*
+ * @param <K> the key type
+ * @param <V> the value type
* @param map the map to decorate, must not be null
* @param factory the factory to use, must not be null
+ * @return a new lazy sorted map
* @throws IllegalArgumentException if map or factory is null
*/
public static <K, V> LazySortedMap<K, V> lazySortedMap(SortedMap<K, V> map,
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/ListOrderedMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/ListOrderedMap.java?rev=1382169&r1=1382168&r2=1382169&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/ListOrderedMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/ListOrderedMap.java Fri Sep 7 20:53:09 2012
@@ -89,7 +89,10 @@ public class ListOrderedMap<K, V>
* <p>
* An <code>ArrayList</code> is used to retain order.
*
+ * @param <K> the key type
+ * @param <V> the value type
* @param map the map to decorate, must not be null
+ * @return a new list ordered map
* @throws IllegalArgumentException if map is null
*/
public static <K, V> ListOrderedMap<K, V> listOrderedMap(Map<K, V> map) {
@@ -402,6 +405,7 @@ public class ListOrderedMap<K, V>
* Sets the value at the specified index.
*
* @param index the index of the value to set
+ * @param value the new value to set
* @return the previous value at that index
* @throws IndexOutOfBoundsException if the index is invalid
* @since 3.2
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/MultiKeyMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/MultiKeyMap.java?rev=1382169&r1=1382168&r2=1382169&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/MultiKeyMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/MultiKeyMap.java Fri Sep 7 20:53:09 2012
@@ -87,7 +87,10 @@ public class MultiKeyMap<K, V> extends A
* Decorates the specified map to add the MultiKeyMap API and fast query.
* The map must not be null and must be empty.
*
+ * @param <K> the key type
+ * @param <V> the value type
* @param map the map to decorate, not null
+ * @return a new multi key map
* @throws IllegalArgumentException if the map is null or not empty
*/
public static <K, V> MultiKeyMap<K, V> multiKeyMap(AbstractHashedMap<MultiKey<? extends K>, V> map) {
@@ -151,7 +154,8 @@ public class MultiKeyMap<K, V> extends A
*/
public boolean containsKey(Object key1, Object key2) {
int hashCode = hash(key1, key2);
- AbstractHashedMap.HashEntry<MultiKey<? extends K>, V> entry = decorated().data[decorated().hashIndex(hashCode, decorated().data.length)];
+ AbstractHashedMap.HashEntry<MultiKey<? extends K>, V> entry =
+ decorated().data[decorated().hashIndex(hashCode, decorated().data.length)];
while (entry != null) {
if (entry.hashCode == hashCode && isEqualKey(entry, key1, key2)) {
return true;
@@ -259,7 +263,8 @@ public class MultiKeyMap<K, V> extends A
*/
public V get(Object key1, Object key2, Object key3) {
int hashCode = hash(key1, key2, key3);
- AbstractHashedMap.HashEntry<MultiKey<? extends K>, V> entry = decorated().data[decorated().hashIndex(hashCode, decorated().data.length)];
+ AbstractHashedMap.HashEntry<MultiKey<? extends K>, V> entry =
+ decorated().data[decorated().hashIndex(hashCode, decorated().data.length)];
while (entry != null) {
if (entry.hashCode == hashCode && isEqualKey(entry, key1, key2, key3)) {
return entry.getValue();
@@ -279,7 +284,8 @@ public class MultiKeyMap<K, V> extends A
*/
public boolean containsKey(Object key1, Object key2, Object key3) {
int hashCode = hash(key1, key2, key3);
- AbstractHashedMap.HashEntry<MultiKey<? extends K>, V> entry = decorated().data[decorated().hashIndex(hashCode, decorated().data.length)];
+ AbstractHashedMap.HashEntry<MultiKey<? extends K>, V> entry =
+ decorated().data[decorated().hashIndex(hashCode, decorated().data.length)];
while (entry != null) {
if (entry.hashCode == hashCode && isEqualKey(entry, key1, key2, key3)) {
return true;
@@ -374,7 +380,8 @@ public class MultiKeyMap<K, V> extends A
* @param key3 the third key
* @return true if the key matches
*/
- protected boolean isEqualKey(AbstractHashedMap.HashEntry<MultiKey<? extends K>, V> entry, Object key1, Object key2, Object key3) {
+ protected boolean isEqualKey(AbstractHashedMap.HashEntry<MultiKey<? extends K>, V> entry,
+ Object key1, Object key2, Object key3) {
MultiKey<? extends K> multi = entry.getKey();
return
multi.size() == 3 &&
@@ -395,7 +402,8 @@ public class MultiKeyMap<K, V> extends A
*/
public V get(Object key1, Object key2, Object key3, Object key4) {
int hashCode = hash(key1, key2, key3, key4);
- AbstractHashedMap.HashEntry<MultiKey<? extends K>, V> entry = decorated().data[decorated().hashIndex(hashCode, decorated().data.length)];
+ AbstractHashedMap.HashEntry<MultiKey<? extends K>, V> entry =
+ decorated().data[decorated().hashIndex(hashCode, decorated().data.length)];
while (entry != null) {
if (entry.hashCode == hashCode && isEqualKey(entry, key1, key2, key3, key4)) {
return entry.getValue();
@@ -416,7 +424,8 @@ public class MultiKeyMap<K, V> extends A
*/
public boolean containsKey(Object key1, Object key2, Object key3, Object key4) {
int hashCode = hash(key1, key2, key3, key4);
- AbstractHashedMap.HashEntry<MultiKey<? extends K>, V> entry = decorated().data[decorated().hashIndex(hashCode, decorated().data.length)];
+ AbstractHashedMap.HashEntry<MultiKey<? extends K>, V> entry =
+ decorated().data[decorated().hashIndex(hashCode, decorated().data.length)];
while (entry != null) {
if (entry.hashCode == hashCode && isEqualKey(entry, key1, key2, key3, key4)) {
return true;
@@ -518,7 +527,8 @@ public class MultiKeyMap<K, V> extends A
* @param key4 the fourth key
* @return true if the key matches
*/
- protected boolean isEqualKey(AbstractHashedMap.HashEntry<MultiKey<? extends K>, V> entry, Object key1, Object key2, Object key3, Object key4) {
+ protected boolean isEqualKey(AbstractHashedMap.HashEntry<MultiKey<? extends K>, V> entry,
+ Object key1, Object key2, Object key3, Object key4) {
MultiKey<? extends K> multi = entry.getKey();
return
multi.size() == 4 &&
@@ -541,7 +551,8 @@ public class MultiKeyMap<K, V> extends A
*/
public V get(Object key1, Object key2, Object key3, Object key4, Object key5) {
int hashCode = hash(key1, key2, key3, key4, key5);
- AbstractHashedMap.HashEntry<MultiKey<? extends K>, V> entry = decorated().data[decorated().hashIndex(hashCode, decorated().data.length)];
+ AbstractHashedMap.HashEntry<MultiKey<? extends K>, V> entry =
+ decorated().data[decorated().hashIndex(hashCode, decorated().data.length)];
while (entry != null) {
if (entry.hashCode == hashCode && isEqualKey(entry, key1, key2, key3, key4, key5)) {
return entry.getValue();
@@ -563,7 +574,8 @@ public class MultiKeyMap<K, V> extends A
*/
public boolean containsKey(Object key1, Object key2, Object key3, Object key4, Object key5) {
int hashCode = hash(key1, key2, key3, key4, key5);
- AbstractHashedMap.HashEntry<MultiKey<? extends K>, V> entry = decorated().data[decorated().hashIndex(hashCode, decorated().data.length)];
+ AbstractHashedMap.HashEntry<MultiKey<? extends K>, V> entry =
+ decorated().data[decorated().hashIndex(hashCode, decorated().data.length)];
while (entry != null) {
if (entry.hashCode == hashCode && isEqualKey(entry, key1, key2, key3, key4, key5)) {
return true;
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/MultiValueMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/MultiValueMap.java?rev=1382169&r1=1382168&r2=1382169&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/MultiValueMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/MultiValueMap.java Fri Sep 7 20:53:09 2012
@@ -74,7 +74,10 @@ public class MultiValueMap<K, V> extends
* Creates a map which wraps the given map and
* maps keys to ArrayLists.
*
+ * @param <K> the key type
+ * @param <V> the value type
* @param map the map to wrap
+ * @return a new multi-value map
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
public static <K, V> MultiValueMap<K, V> multiValueMap(Map<K, ? super Collection<V>> map) {
@@ -85,8 +88,11 @@ public class MultiValueMap<K, V> extends
* Creates a map which decorates the given <code>map</code> and
* maps keys to collections of type <code>collectionClass</code>.
*
+ * @param <K> the key type
+ * @param <V> the value type
* @param map the map to wrap
* @param collectionClass the type of the collection class
+ * @return a new multi-value map
*/
public static <K, V, C extends Collection<V>> MultiValueMap<K, V> multiValueMap(Map<K, ? super C> map,
Class<C> collectionClass) {
@@ -97,8 +103,11 @@ public class MultiValueMap<K, V> extends
* Creates a map which decorates the given <code>map</code> and
* creates the value collections using the supplied <code>collectionFactory</code>.
*
+ * @param <K> the key type
+ * @param <V> the value type
* @param map the map to decorate
* @param collectionFactory the collection factory (must return a Collection object).
+ * @return a new multi-value map
*/
public static <K, V, C extends Collection<V>> MultiValueMap<K, V> multiValueMap(Map<K, ? super C> map,
Factory<C> collectionFactory) {
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/PassiveExpiringMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/PassiveExpiringMap.java?rev=1382169&r1=1382168&r2=1382169&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/PassiveExpiringMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/PassiveExpiringMap.java Fri Sep 7 20:53:09 2012
@@ -339,6 +339,7 @@ public class PassiveExpiringMap<K, V>
/**
* All expired entries are removed from the map prior to determining the
* contains result.
+ * {@inheritDoc}
*/
@Override
public boolean containsKey(Object key) {
@@ -349,6 +350,7 @@ public class PassiveExpiringMap<K, V>
/**
* All expired entries are removed from the map prior to determining the
* contains result.
+ * {@inheritDoc}
*/
@Override
public boolean containsValue(Object value) {
@@ -357,8 +359,8 @@ public class PassiveExpiringMap<K, V>
}
/**
- * All expired entries are removed from the map prior to returning the entry
- * set.
+ * All expired entries are removed from the map prior to returning the entry set.
+ * {@inheritDoc}
*/
@Override
public Set<Entry<K, V>> entrySet() {
@@ -367,8 +369,8 @@ public class PassiveExpiringMap<K, V>
}
/**
- * All expired entries are removed from the map prior to returning the entry
- * value.
+ * All expired entries are removed from the map prior to returning the entry value.
+ * {@inheritDoc}
*/
@Override
public V get(Object key) {
@@ -377,8 +379,8 @@ public class PassiveExpiringMap<K, V>
}
/**
- * All expired entries are removed from the map prior to determining if it
- * is empty.
+ * All expired entries are removed from the map prior to determining if it is empty.
+ * {@inheritDoc}
*/
@Override
public boolean isEmpty() {
@@ -387,7 +389,7 @@ public class PassiveExpiringMap<K, V>
}
/**
- * Determines if the given expiration time is less than <code>now</code>
+ * Determines if the given expiration time is less than <code>now</code>.
*
* @param now the time in milliseconds used to compare against the
* expiration time.
@@ -406,8 +408,8 @@ public class PassiveExpiringMap<K, V>
}
/**
- * All expired entries are removed from the map prior to returning the key
- * set.
+ * All expired entries are removed from the map prior to returning the key set.
+ * {@inheritDoc}
*/
@Override
public Set<K> keySet() {
@@ -428,9 +430,8 @@ public class PassiveExpiringMap<K, V>
}
/**
- * Add the given key-value pair to this map as well as recording the entry's
- * expiration time based on the current time in milliseconds,
- * <code>now</code> and this map's {@link #expiringPolicy}.
+ * Add the given key-value pair to this map as well as recording the entry's expiration time based on
+ * the current time in milliseconds, <code>now</code> and this map's {@link #expiringPolicy}.
*/
private V put(K key, V value, long now) {
// record expiration time of new entry
@@ -450,6 +451,7 @@ public class PassiveExpiringMap<K, V>
/**
* Normal {@link Map#remove(Object)} behavior with the addition of removing
* any expiration entry as well.
+ * {@inheritDoc}
*/
@Override
public V remove(Object key) {
@@ -492,6 +494,7 @@ public class PassiveExpiringMap<K, V>
/**
* All expired entries are removed from the map prior to returning the size.
+ * {@inheritDoc}
*/
@Override
public int size() {
@@ -527,8 +530,8 @@ public class PassiveExpiringMap<K, V>
}
/**
- * All expired entries are removed from the map prior to returning the value
- * collection.
+ * All expired entries are removed from the map prior to returning the value collection.
+ * {@inheritDoc}
*/
@Override
public Collection<V> values() {
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/PredicatedMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/PredicatedMap.java?rev=1382169&r1=1382168&r2=1382169&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/PredicatedMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/PredicatedMap.java Fri Sep 7 20:53:09 2012
@@ -66,9 +66,12 @@ public class PredicatedMap<K, V>
* If there are any elements already in the list being decorated, they
* are validated.
*
+ * @param <K> the key type
+ * @param <V> the value type
* @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
+ * @return a new predicated map
* @throws IllegalArgumentException if the map is null
*/
public static <K, V> PredicatedMap<K, V> predicatedMap(Map<K, V> map,
@@ -146,6 +149,7 @@ public class PredicatedMap<K, V>
* Override to validate an object set into the map via <code>setValue</code>.
*
* @param value the value to validate
+ * @return the value itself
* @throws IllegalArgumentException if invalid
* @since 3.1
*/
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/PredicatedSortedMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/PredicatedSortedMap.java?rev=1382169&r1=1382168&r2=1382169&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/PredicatedSortedMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/PredicatedSortedMap.java Fri Sep 7 20:53:09 2012
@@ -54,9 +54,12 @@ public class PredicatedSortedMap<K, V> e
* If there are any elements already in the list being decorated, they
* are validated.
*
+ * @param <K> the key type
+ * @param <V> the value type
* @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
+ * @return a new predicated sorted map
* @throws IllegalArgumentException if the map is null
*/
public static <K, V> PredicatedSortedMap<K, V> predicatedSortedMap(SortedMap<K, V> map,
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/TransformedMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/TransformedMap.java?rev=1382169&r1=1382168&r2=1382169&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/TransformedMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/TransformedMap.java Fri Sep 7 20:53:09 2012
@@ -64,9 +64,12 @@ public class TransformedMap<K, V>
* are NOT transformed.
* Contrast this with {@link #transformedMap(Map, Transformer, Transformer)}.
*
+ * @param <K> the key type
+ * @param <V> the value type
* @param map the map to decorate, must not be null
* @param keyTransformer the transformer to use for key conversion, null means no transformation
* @param valueTransformer the transformer to use for value conversion, null means no transformation
+ * @return a new transformed map
* @throws IllegalArgumentException if map is null
*/
public static <K, V> TransformedMap<K, V> transformingMap(Map<K, V> map,
@@ -83,9 +86,12 @@ public class TransformedMap<K, V>
* will be transformed by this method.
* Contrast this with {@link #transformingMap(Map, Transformer, Transformer)}.
*
+ * @param <K> the key type
+ * @param <V> the value type
* @param map the map to decorate, must not be null
* @param keyTransformer the transformer to use for key conversion, null means no transformation
* @param valueTransformer the transformer to use for value conversion, null means no transformation
+ * @return a new transformed map
* @throws IllegalArgumentException if map is null
* @since 3.2
*/
@@ -154,7 +160,7 @@ public class TransformedMap<K, V>
* The transformer itself may throw an exception if necessary.
*
* @param object the object to transform
- * @throws the transformed object
+ * @return the transformed object
*/
protected K transformKey(K object) {
if (keyTransformer == null) {
@@ -169,7 +175,7 @@ public class TransformedMap<K, V>
* The transformer itself may throw an exception if necessary.
*
* @param object the object to transform
- * @throws the transformed object
+ * @return the transformed object
*/
protected V transformValue(V object) {
if (valueTransformer == null) {
@@ -184,7 +190,7 @@ public class TransformedMap<K, V>
* The transformer itself may throw an exception if necessary.
*
* @param map the map to transform
- * @throws the transformed object
+ * @return the transformed object
*/
@SuppressWarnings("unchecked")
protected Map<K, V> transformMap(Map<? extends K, ? extends V> map) {
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/TransformedSortedMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/TransformedSortedMap.java?rev=1382169&r1=1382168&r2=1382169&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/TransformedSortedMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/TransformedSortedMap.java Fri Sep 7 20:53:09 2012
@@ -51,13 +51,15 @@ public class TransformedSortedMap<K, V>
/**
* Factory method to create a transforming sorted map.
* <p>
- * If there are any elements already in the map being decorated, they
- * are NOT transformed.
+ * If there are any elements already in the map being decorated, they are NOT transformed.
* Contrast this with {@link #transformedSortedMap(SortedMap, Transformer, Transformer)}.
*
+ * @param <K> the key type
+ * @param <V> the value type
* @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
+ * @return a new transformed sorted map
* @throws IllegalArgumentException if the map is null
*/
public static <K, V> TransformedSortedMap<K, V> transformingSortedMap(SortedMap<K, V> map,
@@ -74,9 +76,12 @@ public class TransformedSortedMap<K, V>
* will be transformed by this method.
* Contrast this with {@link #transformingSortedMap(SortedMap, Transformer, Transformer)}.
*
+ * @param <K> the key type
+ * @param <V> the value type
* @param map the map to decorate, must not be null
* @param keyTransformer the transformer to use for key conversion, null means no transformation
* @param valueTransformer the transformer to use for value conversion, null means no transformation
+ * @return a new transformed sorted map
* @throws IllegalArgumentException if map is null
* @since 3.2
*/
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/UnmodifiableEntrySet.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/UnmodifiableEntrySet.java?rev=1382169&r1=1382168&r2=1382169&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/UnmodifiableEntrySet.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/UnmodifiableEntrySet.java Fri Sep 7 20:53:09 2012
@@ -44,7 +44,10 @@ public final class UnmodifiableEntrySet<
/**
* Factory method to create an unmodifiable set of Map Entry objects.
*
+ * @param <K> the key type
+ * @param <V> the value type
* @param set the set to decorate, must not be null
+ * @return a new unmodifiable entry set
* @throws IllegalArgumentException if set is null
*/
public static <K, V> Set<Map.Entry<K, V>> unmodifiableEntrySet(Set<Map.Entry<K, V>> set) {
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/UnmodifiableMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/UnmodifiableMap.java?rev=1382169&r1=1382168&r2=1382169&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/UnmodifiableMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/UnmodifiableMap.java Fri Sep 7 20:53:09 2012
@@ -52,7 +52,10 @@ public final class UnmodifiableMap<K, V>
/**
* Factory method to create an unmodifiable map.
*
+ * @param <K> the key type
+ * @param <V> the value type
* @param map the map to decorate, must not be null
+ * @return a new unmodifiable map
* @throws IllegalArgumentException if map is null
*/
public static <K, V> Map<K, V> unmodifiableMap(Map<K, V> map) {
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/UnmodifiableOrderedMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/UnmodifiableOrderedMap.java?rev=1382169&r1=1382168&r2=1382169&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/UnmodifiableOrderedMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/UnmodifiableOrderedMap.java Fri Sep 7 20:53:09 2012
@@ -50,7 +50,10 @@ public final class UnmodifiableOrderedMa
/**
* Factory method to create an unmodifiable sorted map.
*
+ * @param <K> the key type
+ * @param <V> the value type
* @param map the map to decorate, must not be null
+ * @return a new ordered map
* @throws IllegalArgumentException if map is null
*/
public static <K, V> OrderedMap<K, V> unmodifiableOrderedMap(OrderedMap<K, V> map) {
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/UnmodifiableSortedMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/UnmodifiableSortedMap.java?rev=1382169&r1=1382168&r2=1382169&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/UnmodifiableSortedMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/UnmodifiableSortedMap.java Fri Sep 7 20:53:09 2012
@@ -50,7 +50,10 @@ public final class UnmodifiableSortedMap
/**
* Factory method to create an unmodifiable sorted map.
*
+ * @param <K> the key type
+ * @param <V> the value type
* @param map the map to decorate, must not be null
+ * @return a new unmodifiable sorted map
* @throws IllegalArgumentException if map is null
*/
public static <K, V> SortedMap<K, V> unmodifiableSortedMap(SortedMap<K, V> map) {