From 3254e85306a614287311447ec68da5ee47249ae7 Mon Sep 17 00:00:00 2001 From: Thomas Neidhart Date: Sat, 11 Aug 2012 13:47:47 +0000 Subject: [PATCH] Added missing javadoc. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1371954 13f79535-47bb-0310-9956-ffa450edef68 --- .../commons/collections/map/AbstractReferenceMap.java | 9 ++++++--- .../org/apache/commons/collections/map/DefaultedMap.java | 3 +++ .../org/apache/commons/collections/map/FixedSizeMap.java | 1 + .../commons/collections/map/FixedSizeSortedMap.java | 1 + .../java/org/apache/commons/collections/map/LazyMap.java | 2 ++ 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/apache/commons/collections/map/AbstractReferenceMap.java b/src/main/java/org/apache/commons/collections/map/AbstractReferenceMap.java index c767bb268..d2b96b888 100644 --- a/src/main/java/org/apache/commons/collections/map/AbstractReferenceMap.java +++ b/src/main/java/org/apache/commons/collections/map/AbstractReferenceMap.java @@ -92,7 +92,7 @@ public abstract class AbstractReferenceMap extends AbstractHashedMap /** * Resolve enum from int. - * @param value + * @param value the int value * @return ReferenceType * @throws IllegalArgumentException if the specified value is invalid. */ @@ -695,11 +695,13 @@ public abstract class AbstractReferenceMap extends AbstractHashedMap * Constructs a reference of the given type to the given referent. * The reference is registered with the queue for later purging. * + * @param the type of the referenced object * @param type HARD, SOFT or WEAK * @param referent the object to refer to * @param hash the hash code of the key of the mapping; * this number might be different from referent.hashCode() if * the referent represents a value and not a key + * @return the reference to the object */ protected Object toReference(ReferenceStrength type, T referent, int hash) { if (type == ReferenceStrength.HARD) { @@ -845,7 +847,8 @@ public abstract class AbstractReferenceMap extends AbstractHashedMap /** * The EntrySet iterator. */ - static class ReferenceEntrySetIterator extends ReferenceBaseIterator implements Iterator> { + static class ReferenceEntrySetIterator + extends ReferenceBaseIterator implements Iterator> { public ReferenceEntrySetIterator(AbstractReferenceMap parent) { super(parent); @@ -1001,7 +1004,7 @@ public abstract class AbstractReferenceMap extends AbstractHashedMap } /** - * Replaces the superclassm method to read the state of this class. + * Replaces the superclass method to read the state of this class. *

* Serialization is not one of the JDK's nicest topics. Normal serialization will * initialise the superclass before the subclass. Sometimes however, this isn't diff --git a/src/main/java/org/apache/commons/collections/map/DefaultedMap.java b/src/main/java/org/apache/commons/collections/map/DefaultedMap.java index 6d998907f..6f4a4d793 100644 --- a/src/main/java/org/apache/commons/collections/map/DefaultedMap.java +++ b/src/main/java/org/apache/commons/collections/map/DefaultedMap.java @@ -77,6 +77,7 @@ public class DefaultedMap extends AbstractMapDecorator implements Se * * @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 * @throws IllegalArgumentException if map is null */ public static DefaultedMap defaultedMap(Map map, V defaultValue) { @@ -91,6 +92,7 @@ public class DefaultedMap extends AbstractMapDecorator implements Se * * @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 * @throws IllegalArgumentException if map or factory is null */ public static DefaultedMap defaultedMap(Map map, Factory factory) { @@ -109,6 +111,7 @@ public class DefaultedMap extends AbstractMapDecorator implements Se * * @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 * @throws IllegalArgumentException if map or factory is null */ public static Map defaultedMap(Map map, Transformer transformer) { diff --git a/src/main/java/org/apache/commons/collections/map/FixedSizeMap.java b/src/main/java/org/apache/commons/collections/map/FixedSizeMap.java index 1c344a4be..3627af871 100644 --- a/src/main/java/org/apache/commons/collections/map/FixedSizeMap.java +++ b/src/main/java/org/apache/commons/collections/map/FixedSizeMap.java @@ -63,6 +63,7 @@ public class FixedSizeMap * Factory method to create a fixed size map. * * @param map the map to decorate, must not be null + * @return a new fixed size map * @throws IllegalArgumentException if map is null */ public static FixedSizeMap fixedSizeMap(Map map) { diff --git a/src/main/java/org/apache/commons/collections/map/FixedSizeSortedMap.java b/src/main/java/org/apache/commons/collections/map/FixedSizeSortedMap.java index ea466c9eb..cf6e24bf7 100644 --- a/src/main/java/org/apache/commons/collections/map/FixedSizeSortedMap.java +++ b/src/main/java/org/apache/commons/collections/map/FixedSizeSortedMap.java @@ -65,6 +65,7 @@ public class FixedSizeSortedMap * Factory method to create a fixed size sorted map. * * @param map the map to decorate, must not be null + * @return a new fixed size sorted map * @throws IllegalArgumentException if map is null */ public static FixedSizeSortedMap fixedSizeSortedMap(SortedMap map) { diff --git a/src/main/java/org/apache/commons/collections/map/LazyMap.java b/src/main/java/org/apache/commons/collections/map/LazyMap.java index bbd5e2df5..8bb2a1b7c 100644 --- a/src/main/java/org/apache/commons/collections/map/LazyMap.java +++ b/src/main/java/org/apache/commons/collections/map/LazyMap.java @@ -72,6 +72,7 @@ public class LazyMap extends AbstractMapDecorator implements Map LazyMap lazyMap(Map map, Factory< ? extends V> factory) { @@ -83,6 +84,7 @@ public class LazyMap extends AbstractMapDecorator implements Map LazyMap lazyMap(Map map, Transformer factory) {