Author: tn
Date: Mon Jan 21 16:35:01 2013
New Revision: 1436463
URL: http://svn.apache.org/viewvc?rev=1436463&view=rev
Log:
Complete javadoc, modify examples to use generics.
Modified:
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractHashedMap.java
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/AbstractSortedMapDecorator.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/CaseInsensitiveMap.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/EntrySetToMapIteratorAdapter.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/LazySortedMap.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/MultiValueMap.java
Modified:
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractHashedMap.java
URL:
http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractHashedMap.java?rev=1436463&r1=1436462&r2=1436463&view=diff
==============================================================================
---
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractHashedMap.java
(original)
+++
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractHashedMap.java
Mon Jan 21 16:35:01 2013
@@ -1223,6 +1223,7 @@ public class AbstractHashedMap<K, V> ext
* what must be serialized here, if anything.
*
* @param out the output stream
+ * @throws IOException if an error occurs while writing tothe stream
*/
protected void doWriteObject(final ObjectOutputStream out) throws
IOException {
out.writeFloat(loadFactor);
@@ -1251,6 +1252,8 @@ public class AbstractHashedMap<K, V> ext
* before <code>put()</code> or <code>calculateThreshold()</code> will
work correctly.
*
* @param in the input stream
+ * @throws IOException if an error occurs while reading from the stream
+ * @throws ClassNotFoundException if an object read from the stream can
not be loaded
*/
@SuppressWarnings("unchecked")
protected void doReadObject(final ObjectInputStream in) throws
IOException, ClassNotFoundException {
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=1436463&r1=1436462&r2=1436463&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
Mon Jan 21 16:35:01 2013
@@ -989,6 +989,7 @@ public abstract class AbstractReferenceM
* what must be serialized here, if anything.
*
* @param out the output stream
+ * @throws IOException if an error occurs while writing to the stream
*/
@Override
protected void doWriteObject(final ObjectOutputStream out) throws
IOException {
@@ -1021,6 +1022,8 @@ public abstract class AbstractReferenceM
* before <code>put()</code> or <code>calculateThreshold()</code> will
work correctly.
*
* @param in the input stream
+ * @throws IOException if an error occurs while reading from the stream
+ * @throws ClassNotFoundException if an object read from the stream can
not be loaded
*/
@Override
@SuppressWarnings("unchecked")
Modified:
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractSortedMapDecorator.java
URL:
http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractSortedMapDecorator.java?rev=1436463&r1=1436462&r2=1436463&view=diff
==============================================================================
---
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractSortedMapDecorator.java
(original)
+++
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/AbstractSortedMapDecorator.java
Mon Jan 21 16:35:01 2013
@@ -122,14 +122,15 @@ public abstract class AbstractSortedMapD
/**
* OrderedMapIterator implementation.
*
- * @param <K>
- * @param <V>
+ * @param <K> the key type
+ * @param <V> the value type
*/
protected static class SortedMapIterator<K, V> extends
EntrySetToMapIteratorAdapter<K, V>
implements OrderedMapIterator<K, V> {
/**
* Create a new AbstractSortedMapDecorator.SortedMapIterator.
+ * @param entrySet the entrySet to iterate
*/
protected SortedMapIterator(final Set<Map.Entry<K, V>> entrySet) {
super(entrySet);
Modified:
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/CaseInsensitiveMap.java
URL:
http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/CaseInsensitiveMap.java?rev=1436463&r1=1436462&r2=1436463&view=diff
==============================================================================
---
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/CaseInsensitiveMap.java
(original)
+++
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/CaseInsensitiveMap.java
Mon Jan 21 16:35:01 2013
@@ -35,7 +35,7 @@ import java.util.Map;
* <p>
* Example:
* <pre><code>
- * Map map = new CaseInsensitiveMap();
+ * Map<String, String> map = new CaseInsensitiveMap<String,
String>();
* map.put("One", "One");
* map.put("Two", "Two");
* map.put(null, "Three");
Modified:
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/EntrySetToMapIteratorAdapter.java
URL:
http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/EntrySetToMapIteratorAdapter.java?rev=1436463&r1=1436462&r2=1436463&view=diff
==============================================================================
---
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/EntrySetToMapIteratorAdapter.java
(original)
+++
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/EntrySetToMapIteratorAdapter.java
Mon Jan 21 16:35:01 2013
@@ -41,6 +41,7 @@ public class EntrySetToMapIteratorAdapte
/**
* Create a new EntrySetToMapIteratorAdapter.
+ * @param entrySet the entrySet to adapt
*/
public EntrySetToMapIteratorAdapter(final Set<Map.Entry<K, V>> entrySet) {
this.entrySet = entrySet;
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=1436463&r1=1436462&r2=1436463&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
Mon Jan 21 16:35:01 2013
@@ -426,6 +426,9 @@ public class LRUMap<K, V>
/**
* Writes the data necessary for <code>put()</code> to work in
deserialization.
+ *
+ * @param out the output stream
+ * @throws IOException if an error occurs while writing to the stream
*/
@Override
protected void doWriteObject(final ObjectOutputStream out) throws
IOException {
@@ -435,6 +438,10 @@ public class LRUMap<K, V>
/**
* Reads the data necessary for <code>put()</code> to work in the
superclass.
+ *
+ * @param in the input stream
+ * @throws IOException if an error occurs while reading from the stream
+ * @throws ClassNotFoundException if an object read from the stream can
not be loaded
*/
@Override
protected void doReadObject(final ObjectInputStream in) throws
IOException, ClassNotFoundException {
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=1436463&r1=1436462&r2=1436463&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
Mon Jan 21 16:35:01 2013
@@ -56,9 +56,7 @@ import org.apache.commons.collections.Tr
* @since 3.0
* @version $Id$
*/
-public class LazySortedMap<K,V>
- extends LazyMap<K,V>
- implements SortedMap<K,V> {
+public class LazySortedMap<K,V> extends LazyMap<K,V> implements SortedMap<K,V>
{
/** Serialization version */
private static final long serialVersionUID = 2715322183617658933L;
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=1436463&r1=1436462&r2=1436463&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
Mon Jan 21 16:35:01 2013
@@ -90,6 +90,7 @@ public class MultiValueMap<K, V> extends
*
* @param <K> the key type
* @param <V> the value type
+ * @param <C> the collection class type
* @param map the map to wrap
* @param collectionClass the type of the collection class
* @return a new multi-value map
@@ -105,6 +106,7 @@ public class MultiValueMap<K, V> extends
*
* @param <K> the key type
* @param <V> the value type
+ * @param <C> the collection class type
* @param map the map to decorate
* @param collectionFactory the collection factory (must return a
Collection object).
* @return a new multi-value map
@@ -128,6 +130,7 @@ public class MultiValueMap<K, V> extends
* Creates a MultiValueMap which decorates the given <code>map</code> and
* creates the value collections using the supplied
<code>collectionFactory</code>.
*
+ * @param <C> the collection class type
* @param map the map to decorate
* @param collectionFactory the collection factory which must return a
Collection instance
*/
@@ -307,6 +310,7 @@ public class MultiValueMap<K, V> extends
/**
* Checks whether the collection at the specified key contains the value.
*
+ * @param key the key to search for
* @param value the value to search for
* @return true if the map contains the value
*/