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:
parent
790c5068f7
commit
1377fa84d7
|
@ -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<Object>
|
||||
* for the sake of backward compatibility.
|
||||
*
|
||||
* @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) {
|
||||
final List<String> result = new ArrayList<String>(stringTokenizer.countTokens());
|
||||
|
|
|
@ -35,7 +35,7 @@ package org.apache.commons.collections4.comparators.sequence;
|
|||
* The first example is a visitor that build the longest common
|
||||
* subsequence:
|
||||
* <pre>
|
||||
* import org.apache.commons.collections.list.difference.CommandVisitor;
|
||||
* import org.apache.commons.collections4.comparators.sequence.CommandVisitor;
|
||||
*
|
||||
* 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
|
||||
* they transform the first sequence into the second one:
|
||||
* <pre>
|
||||
* import org.apache.commons.collections.list.difference.CommandVisitor;
|
||||
* import org.apache.commons.collections4.comparators.sequence.CommandVisitor;
|
||||
*
|
||||
* import java.util.Arrays;
|
||||
* import java.util.ArrayList;
|
||||
|
|
|
@ -44,13 +44,11 @@
|
|||
* Eugene W. Myers and described in his paper: <a
|
||||
* href="http://www.cis.upenn.edu/~bcpierce/courses/dd/papers/diff.ps">An O(ND)
|
||||
* Difference Algorithm and Its Variations</a>. This algorithm produces
|
||||
* the shortest possible {@link
|
||||
* org.apache.commons.collections.list.difference.EditScript edit script} containing
|
||||
* all the {@link org.apache.commons.collections.list.difference.EditCommand
|
||||
* commands} needed to transform the first sequence into the second
|
||||
* one. The entry point for the user to this algorithm is the {@link
|
||||
* org.apache.commons.collections.list.difference.SequencesComparator
|
||||
* SequencesComparator} class.
|
||||
* the shortest possible {@link EditScript edit script} containing
|
||||
* all the {@link EditCommand commands} needed to transform the first sequence
|
||||
* into the second one.
|
||||
* The entry point for the user to this algorithm is the
|
||||
* {@link SequencesComparator} class.
|
||||
* <p>
|
||||
* As explained in Gene Myers paper, the edit script is equivalent to all
|
||||
* other representations and contains all the needed information either
|
||||
|
@ -59,22 +57,19 @@
|
|||
* <p>
|
||||
* 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
|
||||
* the {@link org.apache.commons.collections.list.difference.CommandVisitor
|
||||
* CommandVisitor} interface.
|
||||
* the {@link CommandVisitor} interface.
|
||||
* <p>
|
||||
* Sometimes however, a more synthetic approach is needed. If the user
|
||||
* prefers to see the differences between the two sequences as global
|
||||
* <code>replacement</code> operations acting on complete subsequences of
|
||||
* the original sequences, he will provide an object implementing the
|
||||
* simple {@link org.apache.commons.collections.list.difference.ReplacementsHandler
|
||||
* ReplacementsHandler} interface, using an instance of the {@link
|
||||
* org.apache.commons.collections.list.difference.ReplacementsFinder
|
||||
* ReplacementsFinder} class as a command converting layer between his
|
||||
* simple {@link ReplacementsHandler} interface, using an instance of the
|
||||
* {@link ReplacementsFinder} class as a command converting layer between his
|
||||
* 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
|
||||
* {@link org.apache.commons.collections.list.difference.ReplacementsHandler#handleReplacement
|
||||
* handleReplacement} method is also provided. This allows the user to keep
|
||||
* track of the current index in both arrays if he needs so.
|
||||
* {@link ReplacementsHandler#handleReplacement handleReplacement} method is
|
||||
* also provided. This allows the user to keep track of the current index in
|
||||
* both arrays if he needs so.
|
||||
*
|
||||
* @version $Id$
|
||||
*/
|
||||
|
|
|
@ -58,13 +58,14 @@ import org.apache.commons.collections4.list.UnmodifiableList;
|
|||
* using {@link java.util.Collections#synchronizedMap(Map)}. This class may throw
|
||||
* exceptions when accessed by concurrent threads without synchronization.
|
||||
* <p>
|
||||
* <strong>Note that ListOrderedMap doesn't work with {@link IdentityMap},
|
||||
* {@link CaseInsensitiveMap}, or similar maps that violate the general
|
||||
* contract of {@link java.util.Map}.</strong> The <code>ListOrderedMap</code>
|
||||
* (or, more precisely, the underlying <code>List</code>) is relying on
|
||||
* {@link Object#equals(Object) equals()}. This is fine, as long as the
|
||||
* <strong>Note that ListOrderedMap doesn't work with
|
||||
* {@link java.util.IdentityHashMap IdentityHashMap}, {@link CaseInsensitiveMap},
|
||||
* or similar maps that violate the general contract of {@link java.util.Map}.</strong>
|
||||
* The <code>ListOrderedMap</code> (or, more precisely, the underlying <code>List</code>)
|
||||
* 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()},
|
||||
* 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
|
||||
* the latter uses {@link Object#equals(Object) equals()} on a lower-cased
|
||||
* key.
|
||||
|
|
|
@ -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
|
||||
* if there are multiple values mapped to this key.
|
||||
* <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}.
|
||||
*
|
||||
* @return the iterator of all mappings in this map
|
||||
|
|
|
@ -40,7 +40,7 @@ import org.apache.commons.collections4.Transformer;
|
|||
* <p>
|
||||
* This class is Serializable from Commons Collections 3.1.
|
||||
* <p>
|
||||
* @see org.apache.commons.collections.splitmap.TransformedMap
|
||||
* @see org.apache.commons.collections4.splitmap.TransformedMap
|
||||
*
|
||||
* @since 3.0
|
||||
* @version $Id$
|
||||
|
|
|
@ -37,9 +37,9 @@ import org.apache.commons.collections4.BoundedCollection;
|
|||
* insertion order; elements are removed in the same order in which they
|
||||
* were added. The iteration order is the same as the removal order.
|
||||
* <p>
|
||||
* The {@link #add(Object)}, {@link #remove()} and {@link #get()} operations
|
||||
* all perform in constant time. All other operations perform in linear
|
||||
* time or worse.
|
||||
* The {@link #add(Object)}, {@link #remove()}, {@link #peek()}, {@link #poll},
|
||||
* {@link #offer(Object) operations all perform in constant time.
|
||||
* All other operations perform in linear time or worse.
|
||||
* <p>
|
||||
* This queue prevents null objects from being added.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue