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/08/11 15:47:48 UTC
svn commit: r1371954 - in
/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map:
AbstractReferenceMap.java DefaultedMap.java FixedSizeMap.java
FixedSizeSortedMap.java LazyMap.java
Author: tn
Date: Sat Aug 11 13:47:47 2012
New Revision: 1371954
URL: http://svn.apache.org/viewvc?rev=1371954&view=rev
Log:
Added missing javadoc.
Modified:
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractReferenceMap.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/LazyMap.java
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractReferenceMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractReferenceMap.java?rev=1371954&r1=1371953&r2=1371954&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractReferenceMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractReferenceMap.java Sat Aug 11 13:47:47 2012
@@ -92,7 +92,7 @@ public abstract class AbstractReferenceM
/**
* 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 AbstractReferenceM
* Constructs a reference of the given type to the given referent.
* The reference is registered with the queue for later purging.
*
+ * @param <T> 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 <i>key</i> 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 <T> Object toReference(ReferenceStrength type, T referent, int hash) {
if (type == ReferenceStrength.HARD) {
@@ -845,7 +847,8 @@ public abstract class AbstractReferenceM
/**
* The EntrySet iterator.
*/
- static class ReferenceEntrySetIterator<K, V> extends ReferenceBaseIterator<K, V> implements Iterator<Map.Entry<K, V>> {
+ static class ReferenceEntrySetIterator<K, V>
+ extends ReferenceBaseIterator<K, V> implements Iterator<Map.Entry<K, V>> {
public ReferenceEntrySetIterator(AbstractReferenceMap<K, V> parent) {
super(parent);
@@ -1001,7 +1004,7 @@ public abstract class AbstractReferenceM
}
/**
- * Replaces the superclassm method to read the state of this class.
+ * Replaces the superclass method to read the state of this class.
* <p>
* Serialization is not one of the JDK's nicest topics. Normal serialization will
* initialise the superclass before the subclass. Sometimes however, this isn't
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=1371954&r1=1371953&r2=1371954&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 Sat Aug 11 13:47:47 2012
@@ -77,6 +77,7 @@ public class DefaultedMap<K, V> extends
*
* @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 <K, V> DefaultedMap<K, V> defaultedMap(Map<K, V> map, V defaultValue) {
@@ -91,6 +92,7 @@ public class DefaultedMap<K, V> extends
*
* @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 <K, V> DefaultedMap<K, V> defaultedMap(Map<K, V> map, Factory<? extends V> factory) {
@@ -109,6 +111,7 @@ public class DefaultedMap<K, V> extends
*
* @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 <K, V> Map<K, V> defaultedMap(Map<K, V> map, Transformer<? super K, ? extends V> transformer) {
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=1371954&r1=1371953&r2=1371954&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 Sat Aug 11 13:47:47 2012
@@ -63,6 +63,7 @@ public class FixedSizeMap<K, V>
* 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 <K, V> FixedSizeMap<K, V> fixedSizeMap(Map<K, V> map) {
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=1371954&r1=1371953&r2=1371954&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 Sat Aug 11 13:47:47 2012
@@ -65,6 +65,7 @@ public class FixedSizeSortedMap<K, V>
* 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 <K, V> FixedSizeSortedMap<K, V> fixedSizeSortedMap(SortedMap<K, V> map) {
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=1371954&r1=1371953&r2=1371954&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 Sat Aug 11 13:47:47 2012
@@ -72,6 +72,7 @@ public class LazyMap<K, V> extends Abstr
*
* @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
* @throws IllegalArgumentException if map or factory is null
*/
public static <K, V> LazyMap<K, V> lazyMap(Map<K, V> map, Factory< ? extends V> factory) {
@@ -83,6 +84,7 @@ public class LazyMap<K, V> extends Abstr
*
* @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
* @throws IllegalArgumentException if map or factory is null
*/
public static <V, K> LazyMap<K, V> lazyMap(Map<K, V> map, Transformer<? super K, ? extends V> factory) {