Complete javadoc, modify examples to use generics.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1436463 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e4c40331b4
commit
230597979a
|
@ -1223,6 +1223,7 @@ public class AbstractHashedMap<K, V> extends AbstractMap<K, V> implements Iterab
|
|||
* 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> extends AbstractMap<K, V> implements Iterab
|
|||
* 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 {
|
||||
|
|
|
@ -989,6 +989,7 @@ public abstract class AbstractReferenceMap<K, V> extends AbstractHashedMap<K, V>
|
|||
* 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 AbstractReferenceMap<K, V> extends AbstractHashedMap<K, V>
|
|||
* 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")
|
||||
|
|
|
@ -122,14 +122,15 @@ public abstract class AbstractSortedMapDecorator<K, V> extends AbstractMapDecora
|
|||
/**
|
||||
* 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);
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -41,6 +41,7 @@ public class EntrySetToMapIteratorAdapter<K, V> implements MapIterator<K, V>, Re
|
|||
|
||||
/**
|
||||
* Create a new EntrySetToMapIteratorAdapter.
|
||||
* @param entrySet the entrySet to adapt
|
||||
*/
|
||||
public EntrySetToMapIteratorAdapter(final Set<Map.Entry<K, V>> entrySet) {
|
||||
this.entrySet = entrySet;
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -56,9 +56,7 @@ import org.apache.commons.collections.Transformer;
|
|||
* @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;
|
||||
|
|
|
@ -90,6 +90,7 @@ public class MultiValueMap<K, V> extends AbstractMapDecorator<K, Object> impleme
|
|||
*
|
||||
* @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 AbstractMapDecorator<K, Object> impleme
|
|||
*
|
||||
* @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 AbstractMapDecorator<K, Object> impleme
|
|||
* 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 AbstractMapDecorator<K, Object> impleme
|
|||
/**
|
||||
* 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
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue