Fix javadoc links and code examples.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1476599 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Neidhart 2013-04-27 15:12:42 +00:00
parent 790c5068f7
commit 1377fa84d7
7 changed files with 27 additions and 31 deletions

View File

@ -52,11 +52,11 @@ public class EnumerationUtils {
} }
/** /**
* Override toList(Enumeration) for StringTokenizer as it implements Enumeration<String> * Override toList(Enumeration) for StringTokenizer as it implements Enumeration&lt;Object&gt;
* for the sake of backward compatibility. * for the sake of backward compatibility.
* *
* @param stringTokenizer the tokenizer to convert to a {@link #List(String)} * @param stringTokenizer the tokenizer to convert to a {@link #List(String)}
* @return List<String> * @return a list containing all tokens of the given StringTokenizer
*/ */
public static List<String> toList(final StringTokenizer stringTokenizer) { public static List<String> toList(final StringTokenizer stringTokenizer) {
final List<String> result = new ArrayList<String>(stringTokenizer.countTokens()); final List<String> result = new ArrayList<String>(stringTokenizer.countTokens());

View File

@ -35,7 +35,7 @@ package org.apache.commons.collections4.comparators.sequence;
* The first example is a visitor that build the longest common * The first example is a visitor that build the longest common
* subsequence: * subsequence:
* <pre> * <pre>
* import org.apache.commons.collections.list.difference.CommandVisitor; * import org.apache.commons.collections4.comparators.sequence.CommandVisitor;
* *
* import java.util.ArrayList; * import java.util.ArrayList;
* *
@ -67,7 +67,7 @@ package org.apache.commons.collections4.comparators.sequence;
* The second example is a visitor that shows the commands and the way * The second example is a visitor that shows the commands and the way
* they transform the first sequence into the second one: * they transform the first sequence into the second one:
* <pre> * <pre>
* import org.apache.commons.collections.list.difference.CommandVisitor; * import org.apache.commons.collections4.comparators.sequence.CommandVisitor;
* *
* import java.util.Arrays; * import java.util.Arrays;
* import java.util.ArrayList; * import java.util.ArrayList;

View File

@ -44,13 +44,11 @@
* Eugene W. Myers and described in his paper: <a * Eugene W. Myers and described in his paper: <a
* href="http://www.cis.upenn.edu/~bcpierce/courses/dd/papers/diff.ps">An O(ND) * href="http://www.cis.upenn.edu/~bcpierce/courses/dd/papers/diff.ps">An O(ND)
* Difference Algorithm and Its Variations</a>. This algorithm produces * Difference Algorithm and Its Variations</a>. This algorithm produces
* the shortest possible {@link * the shortest possible {@link EditScript edit script} containing
* org.apache.commons.collections.list.difference.EditScript edit script} containing * all the {@link EditCommand commands} needed to transform the first sequence
* all the {@link org.apache.commons.collections.list.difference.EditCommand * into the second one.
* commands} needed to transform the first sequence into the second * The entry point for the user to this algorithm is the
* one. The entry point for the user to this algorithm is the {@link * {@link SequencesComparator} class.
* org.apache.commons.collections.list.difference.SequencesComparator
* SequencesComparator} class.
* <p> * <p>
* As explained in Gene Myers paper, the edit script is equivalent to all * As explained in Gene Myers paper, the edit script is equivalent to all
* other representations and contains all the needed information either * other representations and contains all the needed information either
@ -59,22 +57,19 @@
* <p> * <p>
* If the user needs a very fine grained access to the comparison result, * If the user needs a very fine grained access to the comparison result,
* he needs to go through this script by providing a visitor implementing * he needs to go through this script by providing a visitor implementing
* the {@link org.apache.commons.collections.list.difference.CommandVisitor * the {@link CommandVisitor} interface.
* CommandVisitor} interface.
* <p> * <p>
* Sometimes however, a more synthetic approach is needed. If the user * Sometimes however, a more synthetic approach is needed. If the user
* prefers to see the differences between the two sequences as global * prefers to see the differences between the two sequences as global
* <code>replacement</code> operations acting on complete subsequences of * <code>replacement</code> operations acting on complete subsequences of
* the original sequences, he will provide an object implementing the * the original sequences, he will provide an object implementing the
* simple {@link org.apache.commons.collections.list.difference.ReplacementsHandler * simple {@link ReplacementsHandler} interface, using an instance of the
* ReplacementsHandler} interface, using an instance of the {@link * {@link ReplacementsFinder} class as a command converting layer between his
* org.apache.commons.collections.list.difference.ReplacementsFinder
* ReplacementsFinder} class as a command converting layer between his
* object and the edit script. The number of objects which are common to * object and the edit script. The number of objects which are common to
* both initial arrays and hence are skipped between each call to the user * both initial arrays and hence are skipped between each call to the user
* {@link org.apache.commons.collections.list.difference.ReplacementsHandler#handleReplacement * {@link ReplacementsHandler#handleReplacement handleReplacement} method is
* handleReplacement} method is also provided. This allows the user to keep * also provided. This allows the user to keep track of the current index in
* track of the current index in both arrays if he needs so. * both arrays if he needs so.
* *
* @version $Id$ * @version $Id$
*/ */

View File

@ -58,13 +58,14 @@ import org.apache.commons.collections4.list.UnmodifiableList;
* using {@link java.util.Collections#synchronizedMap(Map)}. This class may throw * using {@link java.util.Collections#synchronizedMap(Map)}. This class may throw
* exceptions when accessed by concurrent threads without synchronization. * exceptions when accessed by concurrent threads without synchronization.
* <p> * <p>
* <strong>Note that ListOrderedMap doesn't work with {@link IdentityMap}, * <strong>Note that ListOrderedMap doesn't work with
* {@link CaseInsensitiveMap}, or similar maps that violate the general * {@link java.util.IdentityHashMap IdentityHashMap}, {@link CaseInsensitiveMap},
* contract of {@link java.util.Map}.</strong> The <code>ListOrderedMap</code> * or similar maps that violate the general contract of {@link java.util.Map}.</strong>
* (or, more precisely, the underlying <code>List</code>) is relying on * The <code>ListOrderedMap</code> (or, more precisely, the underlying <code>List</code>)
* {@link Object#equals(Object) equals()}. This is fine, as long as the * is relying on {@link Object#equals(Object) equals()}. This is fine, as long as the
* decorated <code>Map</code> is also based on {@link Object#equals(Object) equals()}, * decorated <code>Map</code> is also based on {@link Object#equals(Object) equals()},
* and {@link Object#hashCode() hashCode()}, which {@link IdentityMap}, and * and {@link Object#hashCode() hashCode()}, which
* {@link java.util.IdentityHashMap IdentityHashMap}, and
* {@link CaseInsensitiveMap} don't: The former uses <code>==</code>, and * {@link CaseInsensitiveMap} don't: The former uses <code>==</code>, and
* the latter uses {@link Object#equals(Object) equals()} on a lower-cased * the latter uses {@link Object#equals(Object) equals()} on a lower-cased
* key. * key.

View File

@ -412,7 +412,7 @@ public class MultiValueMap<K, V> extends AbstractMapDecorator<K, Object> impleme
* The iterator will return multiple Entry objects with the same key * The iterator will return multiple Entry objects with the same key
* if there are multiple values mapped to this key. * if there are multiple values mapped to this key.
* <p> * <p>
* NOTE: calling {@link Map.Entry#setValue(Object)} on any of the returned * NOTE: calling {@link Entry#setValue(Object)} on any of the returned
* elements will result in a {@link UnsupportedOperationException}. * elements will result in a {@link UnsupportedOperationException}.
* *
* @return the iterator of all mappings in this map * @return the iterator of all mappings in this map

View File

@ -40,7 +40,7 @@ import org.apache.commons.collections4.Transformer;
* <p> * <p>
* This class is Serializable from Commons Collections 3.1. * This class is Serializable from Commons Collections 3.1.
* <p> * <p>
* @see org.apache.commons.collections.splitmap.TransformedMap * @see org.apache.commons.collections4.splitmap.TransformedMap
* *
* @since 3.0 * @since 3.0
* @version $Id$ * @version $Id$

View File

@ -37,9 +37,9 @@ import org.apache.commons.collections4.BoundedCollection;
* insertion order; elements are removed in the same order in which they * insertion order; elements are removed in the same order in which they
* were added. The iteration order is the same as the removal order. * were added. The iteration order is the same as the removal order.
* <p> * <p>
* The {@link #add(Object)}, {@link #remove()} and {@link #get()} operations * The {@link #add(Object)}, {@link #remove()}, {@link #peek()}, {@link #poll},
* all perform in constant time. All other operations perform in linear * {@link #offer(Object) operations all perform in constant time.
* time or worse. * All other operations perform in linear time or worse.
* <p> * <p>
* This queue prevents null objects from being added. * This queue prevents null objects from being added.
* *