Added missing javadoc.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1371954 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Neidhart 2012-08-11 13:47:47 +00:00
parent 6ba3818153
commit 3254e85306
5 changed files with 13 additions and 3 deletions

View File

@ -92,7 +92,7 @@ public abstract class AbstractReferenceMap<K, V> extends AbstractHashedMap<K, V>
/**
* 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<K, V> extends AbstractHashedMap<K, V>
* 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 AbstractReferenceMap<K, V> extends AbstractHashedMap<K, V>
/**
* 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 AbstractReferenceMap<K, V> extends AbstractHashedMap<K, V>
}
/**
* 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

View File

@ -77,6 +77,7 @@ public class DefaultedMap<K, V> extends AbstractMapDecorator<K, V> 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 <K, V> DefaultedMap<K, V> defaultedMap(Map<K, V> map, V defaultValue) {
@ -91,6 +92,7 @@ public class DefaultedMap<K, V> extends AbstractMapDecorator<K, V> 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 <K, V> DefaultedMap<K, V> defaultedMap(Map<K, V> map, Factory<? extends V> factory) {
@ -109,6 +111,7 @@ public class DefaultedMap<K, V> extends AbstractMapDecorator<K, V> 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 <K, V> Map<K, V> defaultedMap(Map<K, V> map, Transformer<? super K, ? extends V> transformer) {

View File

@ -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) {

View File

@ -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) {

View File

@ -72,6 +72,7 @@ public class LazyMap<K, V> extends AbstractMapDecorator<K, V> implements Map<K,
*
* @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 AbstractMapDecorator<K, V> implements Map<K,
*
* @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) {