diff --git a/src/main/java/org/apache/commons/collections4/ArrayStack.java b/src/main/java/org/apache/commons/collections4/ArrayStack.java
index 7834d2d02..51fe2a310 100644
--- a/src/main/java/org/apache/commons/collections4/ArrayStack.java
+++ b/src/main/java/org/apache/commons/collections4/ArrayStack.java
@@ -21,18 +21,18 @@ import java.util.EmptyStackException;
/**
* An implementation of the {@link java.util.Stack} API that is based on an
- * ArrayList
instead of a Vector
, so it is not
+ * {@code ArrayList} instead of a {@code Vector}, so it is not
* synchronized to protect against multi-threaded access. The implementation
* is therefore operates faster in environments where you do not need to
* worry about multiple thread contention.
*
- * The removal order of an ArrayStack
is based on insertion
+ * The removal order of an {@code ArrayStack} is based on insertion
* order: The most recently added element is removed first. The iteration
* order is not the same as the removal order. The iterator returns
* elements from the bottom up.
*
*
- * Unlike Stack
, ArrayStack
accepts null entries.
+ * Unlike {@code Stack}, {@code ArrayStack} accepts null entries.
*
* Note: From version 4.0 onwards, this class does not implement the
* removed {@code Buffer} interface anymore.
@@ -50,15 +50,15 @@ public class ArrayStack extends ArrayList {
private static final long serialVersionUID = 2130079159931574599L;
/**
- * Constructs a new empty ArrayStack
. The initial size
- * is controlled by ArrayList
and is currently 10.
+ * Constructs a new empty {@code ArrayStack}. The initial size
+ * is controlled by {@code ArrayList} and is currently 10.
*/
public ArrayStack() {
super();
}
/**
- * Constructs a new empty ArrayStack
with an initial size.
+ * Constructs a new empty {@code ArrayStack} with an initial size.
*
* @param initialSize the initial size to use
* @throws IllegalArgumentException if the specified initial size
@@ -69,10 +69,10 @@ public class ArrayStack extends ArrayList {
}
/**
- * Return true
if this stack is currently empty.
+ * Return {@code true} if this stack is currently empty.
*
- * This method exists for compatibility with java.util.Stack
.
- * New users of this class should use isEmpty
instead.
+ * This method exists for compatibility with {@code java.util.Stack}.
+ * New users of this class should use {@code isEmpty} instead.
*
* @return true if the stack is currently empty
*/
@@ -127,7 +127,7 @@ public class ArrayStack extends ArrayList {
/**
* Pushes a new item onto the top of this stack. The pushed item is also
- * returned. This is equivalent to calling add
.
+ * returned. This is equivalent to calling {@code add}.
*
* @param item the item to be added
* @return the item just pushed
@@ -140,9 +140,9 @@ public class ArrayStack extends ArrayList {
/**
* Returns the one-based position of the distance from the top that the
* specified object exists on this stack, where the top-most element is
- * considered to be at distance 1
. If the object is not
- * present on the stack, return -1
instead. The
- * equals()
method is used to compare to the items
+ * considered to be at distance {@code 1}. If the object is not
+ * present on the stack, return {@code -1} instead. The
+ * {@code equals()} method is used to compare to the items
* in this stack.
*
* @param object the object to be searched for
diff --git a/src/main/java/org/apache/commons/collections4/Bag.java b/src/main/java/org/apache/commons/collections4/Bag.java
index 04a9c7864..115d4d75e 100644
--- a/src/main/java/org/apache/commons/collections4/Bag.java
+++ b/src/main/java/org/apache/commons/collections4/Bag.java
@@ -24,16 +24,16 @@ import java.util.Set;
* Defines a collection that counts the number of times an object appears in
* the collection.
*
- * Suppose you have a Bag that contains {a, a, b, c}
.
- * Calling {@link #getCount(Object)} on a
would return 2, while
- * calling {@link #uniqueSet()} would return {a, b, c}
.
+ * Suppose you have a Bag that contains {@code {a, a, b, c}}.
+ * Calling {@link #getCount(Object)} on {@code a} would return 2, while
+ * calling {@link #uniqueSet()} would return {@code {a, b, c}}.
*
*
* NOTE: This interface violates the {@link Collection} contract.
* The behavior specified in many of these methods is not the same
- * as the behavior specified by Collection
.
+ * as the behavior specified by {@code Collection}.
* The noncompliant methods are clearly marked with "(Violation)".
- * Exercise caution when using a bag as a Collection
.
+ * Exercise caution when using a bag as a {@code Collection}.
*
*
* This violation resulted from the original specification of this interface.
@@ -67,27 +67,27 @@ public interface Bag extends Collection {
*
* Since this method always increases the size of the bag,
* according to the {@link Collection#add(Object)} contract, it
- * should always return true
. Since it sometimes returns
- * false
, this method violates the contract.
+ * should always return {@code true}. Since it sometimes returns
+ * {@code false}, this method violates the contract.
*
*
* @param object the object to add
- * @return true
if the object was not already in the uniqueSet
+ * @return {@code true} if the object was not already in the {@code uniqueSet}
*/
@Override
boolean add(E object);
/**
- * Adds nCopies
copies of the specified object to the Bag.
+ * Adds {@code nCopies} copies of the specified object to the Bag.
*
* If the object is already in the {@link #uniqueSet()} then increment its
* count as reported by {@link #getCount(Object)}. Otherwise add it to the
- * {@link #uniqueSet()} and report its count as nCopies
.
+ * {@link #uniqueSet()} and report its count as {@code nCopies}.
*
*
* @param object the object to add
* @param nCopies the number of copies to add
- * @return true
if the object was not already in the uniqueSet
+ * @return {@code true} if the object was not already in the {@code uniqueSet}
*/
boolean add(E object, int nCopies);
@@ -104,13 +104,13 @@ public interface Bag extends Collection {
*
*
* @param object the object to remove
- * @return true
if this call changed the collection
+ * @return {@code true} if this call changed the collection
*/
@Override
boolean remove(Object object);
/**
- * Removes nCopies
copies of the specified object from the Bag.
+ * Removes {@code nCopies} copies of the specified object from the Bag.
*
* If the number of copies to remove is greater than the actual number of
* copies in the Bag, no error is thrown.
@@ -118,7 +118,7 @@ public interface Bag extends Collection {
*
* @param object the object to remove
* @param nCopies the number of copies to remove
- * @return true
if this call changed the collection
+ * @return {@code true} if this call changed the collection
*/
boolean remove(Object object, int nCopies);
@@ -142,11 +142,11 @@ public interface Bag extends Collection {
/**
* (Violation)
- * Returns true
if the bag contains all elements in
+ * Returns {@code true} if the bag contains all elements in
* the given collection, respecting cardinality. That is, if the
- * given collection coll
contains n
copies
+ * given collection {@code coll} contains {@code n} copies
* of a given object, calling {@link #getCount(Object)} on that object must
- * be >= n
for all n
in coll
.
+ * be {@code >= n} for all {@code n} in {@code coll}.
*
*
* The {@link Collection#containsAll(Collection)} method specifies
@@ -156,7 +156,7 @@ public interface Bag extends Collection {
*
*
* @param coll the collection to check against
- * @return true
if the Bag contains all the collection
+ * @return {@code true} if the Bag contains all the collection
*/
@Override
boolean containsAll(Collection> coll);
@@ -165,9 +165,9 @@ public interface Bag extends Collection {
* (Violation)
* Remove all elements represented in the given collection,
* respecting cardinality. That is, if the given collection
- * coll
contains n
copies of a given object,
- * the bag will have n
fewer copies, assuming the bag
- * had at least n
copies to begin with.
+ * {@code coll} contains {@code n} copies of a given object,
+ * the bag will have {@code n} fewer copies, assuming the bag
+ * had at least {@code n} copies to begin with.
*
*
* The {@link Collection#removeAll(Collection)} method specifies
@@ -177,7 +177,7 @@ public interface Bag extends Collection {
*
*
* @param coll the collection to remove
- * @return true
if this call changed the collection
+ * @return {@code true} if this call changed the collection
*/
@Override
boolean removeAll(Collection> coll);
@@ -186,11 +186,11 @@ public interface Bag extends Collection {
* (Violation)
* Remove any members of the bag that are not in the given
* collection, respecting cardinality. That is, if the given
- * collection coll
contains n
copies of a
- * given object and the bag has m > n
copies, then
- * delete m - n
copies from the bag. In addition, if
- * e
is an object in the bag but
- * !coll.contains(e)
, then remove e
and any
+ * collection {@code coll} contains {@code n} copies of a
+ * given object and the bag has {@code m > n} copies, then
+ * delete {@code m - n} copies from the bag. In addition, if
+ * {@code e} is an object in the bag but
+ * {@code !coll.contains(e)}, then remove {@code e} and any
* of its copies.
*
*
@@ -201,7 +201,7 @@ public interface Bag extends Collection {
*
*
* @param coll the collection to retain
- * @return true
if this call changed the collection
+ * @return {@code true} if this call changed the collection
*/
@Override
boolean retainAll(Collection> coll);
@@ -233,7 +233,7 @@ public interface Bag extends Collection {
// * Gets a hash code for the Bag compatible with the definition of equals.
// * The hash code is defined as the sum total of a hash code for each element.
// * The per element hash code is defined as
-// * (e==null ? 0 : e.hashCode()) ^ noOccurances)
.
+// * {@code (e==null ? 0 : e.hashCode()) ^ noOccurances)}.
// * This hash code definition is compatible with the Set interface.
// *
// * @return the hash code of the Bag
diff --git a/src/main/java/org/apache/commons/collections4/BagUtils.java b/src/main/java/org/apache/commons/collections4/BagUtils.java
index 931a218c1..b5da468f7 100644
--- a/src/main/java/org/apache/commons/collections4/BagUtils.java
+++ b/src/main/java/org/apache/commons/collections4/BagUtils.java
@@ -246,7 +246,7 @@ public class BagUtils {
}
/**
- * Get an empty Bag
.
+ * Get an empty {@code Bag}.
*
* @param the element type
* @return an empty Bag
@@ -257,7 +257,7 @@ public class BagUtils {
}
/**
- * Get an empty SortedBag
.
+ * Get an empty {@code SortedBag}.
*
* @param the element type
* @return an empty sorted Bag
diff --git a/src/main/java/org/apache/commons/collections4/BidiMap.java b/src/main/java/org/apache/commons/collections4/BidiMap.java
index 2d9bceac3..5834ae40d 100644
--- a/src/main/java/org/apache/commons/collections4/BidiMap.java
+++ b/src/main/java/org/apache/commons/collections4/BidiMap.java
@@ -21,11 +21,11 @@ import java.util.Set;
/**
* Defines a map that allows bidirectional lookup between key and values.
*
- * This extended Map
represents a mapping where a key may
+ * This extended {@code Map} represents a mapping where a key may
* lookup a value and a value may lookup a key with equal ease.
- * This interface extends Map
and so may be used anywhere a map
+ * This interface extends {@code Map} and so may be used anywhere a map
* is required. The interface provides an inverse map view, enabling
- * full access to both directions of the BidiMap
.
+ * full access to both directions of the {@code BidiMap}.
*
*
* Implementations should allow a value to be looked up from a key and
@@ -66,7 +66,7 @@ public interface BidiMap extends IterableMap {
* @param value the value to store
* @return the previous value mapped to this key
*
- * @throws UnsupportedOperationException if the put
method is not supported
+ * @throws UnsupportedOperationException if the {@code put} method is not supported
* @throws ClassCastException (optional) if the map limits the type of the
* value and the specified value is inappropriate
* @throws IllegalArgumentException (optional) if the map limits the values
@@ -80,15 +80,15 @@ public interface BidiMap extends IterableMap {
/**
* Gets the key that is currently mapped to the specified value.
*
- * If the value is not contained in the map, null
is returned.
+ * If the value is not contained in the map, {@code null} is returned.
*
*
* Implementations should seek to make this method perform equally as well
- * as get(Object)
.
+ * as {@code get(Object)}.
*
*
* @param value the value to find the key for
- * @return the mapped key, or null
if not found
+ * @return the mapped key, or {@code null} if not found
*
* @throws ClassCastException (optional) if the map limits the type of the
* value and the specified value is inappropriate
@@ -101,15 +101,15 @@ public interface BidiMap extends IterableMap {
* Removes the key-value pair that is currently mapped to the specified
* value (optional operation).
*
- * If the value is not contained in the map, null
is returned.
+ * If the value is not contained in the map, {@code null} is returned.
*
*
* Implementations should seek to make this method perform equally as well
- * as remove(Object)
.
+ * as {@code remove(Object)}.
*
*
* @param value the value to find the key-value pair for
- * @return the key that was removed, null
if nothing removed
+ * @return the key that was removed, {@code null} if nothing removed
*
* @throws ClassCastException (optional) if the map limits the type of the
* value and the specified value is inappropriate
@@ -124,11 +124,11 @@ public interface BidiMap extends IterableMap {
* Gets a view of this map where the keys and values are reversed.
*
* Changes to one map will be visible in the other and vice versa.
- * This enables both directions of the map to be accessed as a Map
.
+ * This enables both directions of the map to be accessed as a {@code Map}.
*
*
* Implementations should seek to avoid creating a new object every time this
- * method is called. See AbstractMap.values()
etc. Calling this
+ * method is called. See {@code AbstractMap.values()} etc. Calling this
* method on the inverse map should return the original.
*
*
diff --git a/src/main/java/org/apache/commons/collections4/BoundedCollection.java b/src/main/java/org/apache/commons/collections4/BoundedCollection.java
index a5d2c01b3..d07fbd991 100644
--- a/src/main/java/org/apache/commons/collections4/BoundedCollection.java
+++ b/src/main/java/org/apache/commons/collections4/BoundedCollection.java
@@ -37,7 +37,7 @@ public interface BoundedCollection extends Collection {
/**
* Returns true if this collection is full and no new elements can be added.
*
- * @return true
if the collection is full.
+ * @return {@code true} if the collection is full.
*/
boolean isFull();
diff --git a/src/main/java/org/apache/commons/collections4/BoundedMap.java b/src/main/java/org/apache/commons/collections4/BoundedMap.java
index 61a3bb4a5..3a45372fe 100644
--- a/src/main/java/org/apache/commons/collections4/BoundedMap.java
+++ b/src/main/java/org/apache/commons/collections4/BoundedMap.java
@@ -33,7 +33,7 @@ public interface BoundedMap extends IterableMap {
/**
* Returns true if this map is full and no new elements can be added.
*
- * @return true
if the map is full
+ * @return {@code true} if the map is full
*/
boolean isFull();
diff --git a/src/main/java/org/apache/commons/collections4/Closure.java b/src/main/java/org/apache/commons/collections4/Closure.java
index 51ff59c6c..73dcbfb0a 100644
--- a/src/main/java/org/apache/commons/collections4/Closure.java
+++ b/src/main/java/org/apache/commons/collections4/Closure.java
@@ -19,7 +19,7 @@ package org.apache.commons.collections4;
/**
* Defines a functor interface implemented by classes that do something.
*
- * A Closure
represents a block of code which is executed from
+ * A {@code Closure} represents a block of code which is executed from
* inside some block, function or iteration. It operates an input object.
*
*
diff --git a/src/main/java/org/apache/commons/collections4/ClosureUtils.java b/src/main/java/org/apache/commons/collections4/ClosureUtils.java
index 44365a024..bee58541b 100644
--- a/src/main/java/org/apache/commons/collections4/ClosureUtils.java
+++ b/src/main/java/org/apache/commons/collections4/ClosureUtils.java
@@ -32,7 +32,7 @@ import org.apache.commons.collections4.functors.TransformerClosure;
import org.apache.commons.collections4.functors.WhileClosure;
/**
- * ClosureUtils
provides reference implementations and utilities
+ * {@code ClosureUtils} provides reference implementations and utilities
* for the Closure functor interface. The supplied closures are:
*
* - Invoker - invokes a method on the input object
@@ -107,16 +107,16 @@ public class ClosureUtils {
}
/**
- * Creates a Closure that will call the closure
count
times.
+ * Creates a Closure that will call the closure {@code count} times.
*
- * A null closure or zero count returns the NOPClosure
.
+ * A null closure or zero count returns the {@code NOPClosure}.
*
* @see org.apache.commons.collections4.functors.ForClosure
*
* @param the type that the closure acts on
* @param count the number of times to loop
* @param closure the closure to call repeatedly
- * @return the for
closure
+ * @return the {@code for} closure
*/
public static Closure forClosure(final int count, final Closure super E> closure) {
return ForClosure.forClosure(count, closure);
@@ -131,7 +131,7 @@ public class ClosureUtils {
* @param the type that the closure acts on
* @param predicate the predicate to use as an end of loop test, not null
* @param closure the closure to call repeatedly, not null
- * @return the while
closure
+ * @return the {@code while} closure
* @throws NullPointerException if either argument is null
*/
public static Closure whileClosure(final Predicate super E> predicate, final Closure super E> closure) {
@@ -147,7 +147,7 @@ public class ClosureUtils {
* @param the type that the closure acts on
* @param closure the closure to call repeatedly, not null
* @param predicate the predicate to use as an end of loop test, not null
- * @return the do-while
closure
+ * @return the {@code do-while} closure
* @throws NullPointerException if either argument is null
*/
public static Closure doWhileClosure(final Closure super E> closure,
@@ -164,7 +164,7 @@ public class ClosureUtils {
*
* @param the type that the closure acts on
* @param methodName the name of the method
- * @return the invoker
closure
+ * @return the {@code invoker} closure
* @throws NullPointerException if the method name is null
*/
public static Closure invokerClosure(final String methodName) {
@@ -183,7 +183,7 @@ public class ClosureUtils {
* @param methodName the name of the method
* @param paramTypes the parameter types
* @param args the arguments
- * @return the invoker
closure
+ * @return the {@code invoker} closure
* @throws NullPointerException if the method name is null
* @throws IllegalArgumentException if the paramTypes and args don't match
*/
@@ -201,7 +201,7 @@ public class ClosureUtils {
*
* @param the type that the closure acts on
* @param closures an array of closures to chain
- * @return the chained
closure
+ * @return the {@code chained} closure
* @throws NullPointerException if the closures array is null
* @throws NullPointerException if any closure in the array is null
*/
@@ -218,7 +218,7 @@ public class ClosureUtils {
*
* @param the type that the closure acts on
* @param closures a collection of closures to chain
- * @return the chained
closure
+ * @return the {@code chained} closure
* @throws NullPointerException if the closures collection is null
* @throws NullPointerException if any closure in the collection is null
* @throws IllegalArgumentException if the closures collection is empty
@@ -236,7 +236,7 @@ public class ClosureUtils {
* @param the type that the closure acts on
* @param predicate the validating predicate
* @param trueClosure the closure called if the predicate is true
- * @return the if
closure
+ * @return the {@code if} closure
* @throws NullPointerException if the predicate or closure is null
* @since 3.2
*/
@@ -255,7 +255,7 @@ public class ClosureUtils {
* @param predicate the predicate to switch on
* @param trueClosure the closure called if the predicate is true
* @param falseClosure the closure called if the predicate is false
- * @return the switch
closure
+ * @return the {@code switch} closure
* @throws NullPointerException if the predicate or either closure is null
*/
public static Closure ifClosure(final Predicate super E> predicate,
@@ -277,7 +277,7 @@ public class ClosureUtils {
* @param the type that the closure acts on
* @param predicates an array of predicates to check, not null
* @param closures an array of closures to call, not null
- * @return the switch
closure
+ * @return the {@code switch} closure
* @throws NullPointerException if the either array is null
* @throws NullPointerException if any element in the arrays is null
* @throws IllegalArgumentException if the arrays have different sizes
@@ -302,7 +302,7 @@ public class ClosureUtils {
* @param predicates an array of predicates to check, not null
* @param closures an array of closures to call, not null
* @param defaultClosure the default to call if no predicate matches
- * @return the switch
closure
+ * @return the {@code switch} closure
* @throws NullPointerException if the either array is null
* @throws NullPointerException if any element in the arrays is null
* @throws IllegalArgumentException if the arrays are different sizes
@@ -328,7 +328,7 @@ public class ClosureUtils {
*
* @param the type that the closure acts on
* @param predicatesAndClosures a map of predicates to closures
- * @return the switch
closure
+ * @return the {@code switch} closure
* @throws NullPointerException if the map is null
* @throws NullPointerException if any closure in the map is null
* @throws IllegalArgumentException if the map is empty
diff --git a/src/main/java/org/apache/commons/collections4/CollectionUtils.java b/src/main/java/org/apache/commons/collections4/CollectionUtils.java
index 26e265ea4..1030a584a 100644
--- a/src/main/java/org/apache/commons/collections4/CollectionUtils.java
+++ b/src/main/java/org/apache/commons/collections4/CollectionUtils.java
@@ -185,7 +185,7 @@ public class CollectionUtils {
public static final Collection EMPTY_COLLECTION = Collections.emptyList();
/**
- * CollectionUtils
should not normally be instantiated.
+ * {@code CollectionUtils} should not normally be instantiated.
*/
private CollectionUtils() {}
@@ -203,12 +203,12 @@ public class CollectionUtils {
}
/**
- * Returns an immutable empty collection if the argument is null
,
+ * Returns an immutable empty collection if the argument is {@code null},
* or the argument itself otherwise.
*
* @param the element type
- * @param collection the collection, possibly null
- * @return an empty collection if the argument is null
+ * @param collection the collection, possibly {@code null}
+ * @return an empty collection if the argument is {@code null}
*/
public static Collection emptyIfNull(final Collection collection) {
return collection == null ? CollectionUtils.emptyCollection() : collection;
@@ -355,11 +355,11 @@ public class CollectionUtils {
}
/**
- * Returns true
iff all elements of {@code coll2} are also contained
+ * Returns {@code true} iff all elements of {@code coll2} are also contained
* in {@code coll1}. The cardinality of values in {@code coll2} is not taken into account,
* which is the same behavior as {@link Collection#containsAll(Collection)}.
*
- * In other words, this method returns true
iff the
+ * In other words, this method returns {@code true} iff the
* {@link #intersection} of coll1 and coll2 has the same cardinality as
* the set of unique values from {@code coll2}. In case {@code coll2} is empty, {@code true}
* will be returned.
@@ -374,7 +374,7 @@ public class CollectionUtils {
*
* @param coll1 the first collection, must not be null
* @param coll2 the second collection, must not be null
- * @return true
iff the intersection of the collections has the same cardinality
+ * @return {@code true} iff the intersection of the collections has the same cardinality
* as the set of unique elements from the second collection
* @since 4.0
*/
@@ -407,16 +407,16 @@ public class CollectionUtils {
}
/**
- * Returns true
iff at least one element is in both collections.
+ * Returns {@code true} iff at least one element is in both collections.
*
- * In other words, this method returns true
iff the
+ * In other words, this method returns {@code true} iff the
* {@link #intersection} of coll1 and coll2 is not empty.
*
*
- * @param the type of object to lookup in coll1
.
+ * @param the type of object to lookup in {@code coll1}.
* @param coll1 the first collection, must not be null
* @param coll2 the second collection, must not be null
- * @return true
iff the intersection of the collections is non-empty
+ * @return {@code true} iff the intersection of the collections is non-empty
* @since 4.2
* @see #intersection
*/
@@ -438,15 +438,15 @@ public class CollectionUtils {
}
/**
- * Returns true
iff at least one element is in both collections.
+ * Returns {@code true} iff at least one element is in both collections.
*
- * In other words, this method returns true
iff the
+ * In other words, this method returns {@code true} iff the
* {@link #intersection} of coll1 and coll2 is not empty.
*
*
* @param coll1 the first collection, must not be null
* @param coll2 the second collection, must not be null
- * @return true
iff the intersection of the collections is non-empty
+ * @return {@code true} iff the intersection of the collections is non-empty
* @since 2.1
* @see #intersection
*/
@@ -501,7 +501,7 @@ public class CollectionUtils {
*
* @param a the first (sub?) collection, must not be null
* @param b the second (super?) collection, must not be null
- * @return true
iff a is a sub-collection of b
+ * @return {@code true} iff a is a sub-collection of b
* @see #isProperSubCollection
* @see Collection#containsAll
*/
@@ -526,14 +526,14 @@ public class CollectionUtils {
* The implementation assumes
*
*
- * a.size()
and b.size()
represent the
+ * - {@code a.size()} and {@code b.size()} represent the
* total cardinality of a and b, resp.
- * a.size() < Integer.MAXVALUE
+ * - {@code a.size() < Integer.MAXVALUE}
*
*
* @param a the first (sub?) collection, must not be null
* @param b the second (super?) collection, must not be null
- * @return true
iff a is a proper sub-collection of b
+ * @return {@code true} iff a is a proper sub-collection of b
* @see #isSubCollection
* @see Collection#containsAll
*/
@@ -552,7 +552,7 @@ public class CollectionUtils {
*
* @param a the first collection, must not be null
* @param b the second collection, must not be null
- * @return true
iff the collections contain the same elements with the same cardinalities.
+ * @return {@code true} iff the collections contain the same elements with the same cardinalities.
*/
public static boolean isEqualCollection(final Collection> a, final Collection> b) {
if(a.size() != b.size()) {
@@ -589,7 +589,7 @@ public class CollectionUtils {
* @param a the first collection, must not be null
* @param b the second collection, must not be null
* @param equator the Equator used for testing equality
- * @return true
iff the collections contain the same elements with the same cardinalities.
+ * @return {@code true} iff the collections contain the same elements with the same cardinalities.
* @throws NullPointerException if the equator is null
* @since 4.0
*/
@@ -792,7 +792,7 @@ public class CollectionUtils {
* Filter the collection by applying a Predicate to each element. If the
* predicate returns true, remove the element.
*
- * This is equivalent to filter(collection, PredicateUtils.notPredicate(predicate))
+ * This is equivalent to {@code filter(collection, PredicateUtils.notPredicate(predicate))}
* if predicate is != null.
*
*
@@ -849,7 +849,7 @@ public class CollectionUtils {
* Counts the number of elements in the input collection that match the
* predicate.
*
- * A null
collection or predicate matches no elements.
+ * A {@code null} collection or predicate matches no elements.
*
*
* @param the type of object the {@link Iterable} contains
@@ -867,7 +867,7 @@ public class CollectionUtils {
* Answers true if a predicate is true for at least one element of a
* collection.
*
- * A null
collection or predicate returns false.
+ * A {@code null} collection or predicate returns false.
*
*
* @param the type of object the {@link Iterable} contains
@@ -886,10 +886,10 @@ public class CollectionUtils {
* collection.
*
*
- * A null
predicate returns false.
+ * A {@code null} predicate returns false.
*
*
- * A null
or empty collection returns true.
+ * A {@code null} or empty collection returns true.
*
*
* @param the type of object the {@link Iterable} contains
@@ -909,7 +909,7 @@ public class CollectionUtils {
* Selects all elements from input collection which match the given
* predicate into an output collection.
*
- * A null
predicate matches no elements.
+ * A {@code null} predicate matches no elements.
*
*
* @param the type of object the {@link Iterable} contains
@@ -958,12 +958,12 @@ public class CollectionUtils {
* Selects all elements from inputCollection into an output and rejected collection,
* based on the evaluation of the given predicate.
*
- * Elements matching the predicate are added to the outputCollection
,
- * all other elements are added to the rejectedCollection
.
+ * Elements matching the predicate are added to the {@code outputCollection},
+ * all other elements are added to the {@code rejectedCollection}.
*
*
- * If the input predicate is null
, no elements are added to
- * outputCollection
or rejectedCollection
.
+ * If the input predicate is {@code null}, no elements are added to
+ * {@code outputCollection} or {@code rejectedCollection}.
*
*
* Note: calling the method is equivalent to the following code snippet:
@@ -1003,7 +1003,7 @@ public class CollectionUtils {
* Selects all elements from inputCollection which don't match the given
* predicate into an output collection.
*
- * If the input predicate is null
, the result is an empty
+ * If the input predicate is {@code null}, the result is an empty
* list.
*
*
@@ -1024,8 +1024,8 @@ public class CollectionUtils {
* Selects all elements from inputCollection which don't match the given
* predicate and adds them to outputCollection.
*
- * If the input predicate is null
, no elements are added to
- * outputCollection
.
+ * If the input predicate is {@code null}, no elements are added to
+ * {@code outputCollection}.
*
*
* @param the type of object the {@link Iterable} contains
@@ -1232,11 +1232,11 @@ public class CollectionUtils {
}
/**
- * Returns the index
-th value in {@link Iterator}, throwing
- * IndexOutOfBoundsException
if there is no such element.
+ * Returns the {@code index}-th value in {@link Iterator}, throwing
+ * {@code IndexOutOfBoundsException} if there is no such element.
*
- * The Iterator is advanced to index
(or to the end, if
- * index
exceeds the number of entries) as a side effect of this method.
+ * The Iterator is advanced to {@code index} (or to the end, if
+ * {@code index} exceeds the number of entries) as a side effect of this method.
*
*
* @param iterator the iterator to get a value from
@@ -1264,8 +1264,8 @@ public class CollectionUtils {
}
/**
- * Returns the index
-th value in the iterable
's {@link Iterator}, throwing
- * IndexOutOfBoundsException
if there is no such element.
+ * Returns the {@code index}-th value in the {@code iterable}'s {@link Iterator}, throwing
+ * {@code IndexOutOfBoundsException} if there is no such element.
*
* If the {@link Iterable} is a {@link List}, then it will use {@link List#get(int)}.
*
@@ -1283,27 +1283,27 @@ public class CollectionUtils {
}
/**
- * Returns the index
-th value in object
, throwing
- * IndexOutOfBoundsException
if there is no such element or
- * IllegalArgumentException
if object
is not an
+ * Returns the {@code index}-th value in {@code object}, throwing
+ * {@code IndexOutOfBoundsException} if there is no such element or
+ * {@code IllegalArgumentException} if {@code object} is not an
* instance of one of the supported types.
*
* The supported types, and associated semantics are:
*
*
- * - Map -- the value returned is the
Map.Entry
in position
- * index
in the map's entrySet
iterator,
+ * - Map -- the value returned is the {@code Map.Entry} in position
+ * {@code index} in the map's {@code entrySet} iterator,
* if there is such an entry.
* - List -- this method is equivalent to the list's get method.
- * - Array -- the
index
-th array entry is returned,
- * if there is such an entry; otherwise an IndexOutOfBoundsException
+ * - Array -- the {@code index}-th array entry is returned,
+ * if there is such an entry; otherwise an {@code IndexOutOfBoundsException}
* is thrown.
- * - Collection -- the value returned is the
index
-th object
+ * - Collection -- the value returned is the {@code index}-th object
* returned by the collection's default iterator, if there is such an element.
* - Iterator or Enumeration -- the value returned is the
- *
index
-th object in the Iterator/Enumeration, if there
+ * {@code index}-th object in the Iterator/Enumeration, if there
* is such an element. The Iterator/Enumeration is advanced to
- * index
(or to the end, if index
exceeds the
+ * {@code index} (or to the end, if {@code index} exceeds the
* number of entries) as a side effect of this method.
*
*
@@ -1345,8 +1345,8 @@ public class CollectionUtils {
}
/**
- * Returns the index
-th Map.Entry
in the map
's entrySet
,
- * throwing IndexOutOfBoundsException
if there is no such element.
+ * Returns the {@code index}-th {@code Map.Entry} in the {@code map}'s {@code entrySet},
+ * throwing {@code IndexOutOfBoundsException} if there is no such element.
*
* @param the key type in the {@link Map}
* @param the key type in the {@link Map}
@@ -1708,25 +1708,25 @@ public class CollectionUtils {
//-----------------------------------------------------------------------
/**
- * Returns a collection containing all the elements in collection
- * that are also in retain
. The cardinality of an element e
- * in the returned collection is the same as the cardinality of e
- * in collection
unless retain
does not contain e
, in which
+ * Returns a collection containing all the elements in {@code collection}
+ * that are also in {@code retain}. The cardinality of an element {@code e}
+ * in the returned collection is the same as the cardinality of {@code e}
+ * in {@code collection} unless {@code retain} does not contain {@code e}, in which
* case the cardinality is zero. This method is useful if you do not wish to modify
- * the collection c
and thus cannot call c.retainAll(retain);
.
+ * the collection {@code c} and thus cannot call {@code c.retainAll(retain);}.
*
- * This implementation iterates over collection
, checking each element in
- * turn to see if it's contained in retain
. If it's contained, it's added
+ * This implementation iterates over {@code collection}, checking each element in
+ * turn to see if it's contained in {@code retain}. If it's contained, it's added
* to the returned list. As a consequence, it is advised to use a collection type for
- * retain
that provides a fast (e.g. O(1)) implementation of
+ * {@code retain} that provides a fast (e.g. O(1)) implementation of
* {@link Collection#contains(Object)}.
*
*
* @param the type of object the {@link Collection} contains
* @param collection the collection whose contents are the target of the #retailAll operation
* @param retain the collection containing the elements to be retained in the returned collection
- * @return a Collection
containing all the elements of collection
- * that occur at least once in retain
.
+ * @return a {@code Collection} containing all the elements of {@code collection}
+ * that occur at least once in {@code retain}.
* @throws NullPointerException if either parameter is null
* @since 3.2
*/
@@ -1736,17 +1736,17 @@ public class CollectionUtils {
/**
* Returns a collection containing all the elements in
- * collection
that are also in retain
. The
- * cardinality of an element e
in the returned collection is
- * the same as the cardinality of e
in collection
- * unless retain
does not contain e
, in which case
+ * {@code collection} that are also in {@code retain}. The
+ * cardinality of an element {@code e} in the returned collection is
+ * the same as the cardinality of {@code e} in {@code collection}
+ * unless {@code retain} does not contain {@code e}, in which case
* the cardinality is zero. This method is useful if you do not wish to
- * modify the collection c
and thus cannot call
- * c.retainAll(retain);
.
+ * modify the collection {@code c} and thus cannot call
+ * {@code c.retainAll(retain);}.
*
* Moreover this method uses an {@link Equator} instead of
* {@link Object#equals(Object)} to determine the equality of the elements
- * in collection
and retain
. Hence this method is
+ * in {@code collection} and {@code retain}. Hence this method is
* useful in cases where the equals behavior of an object needs to be
* modified without changing the object itself.
*
@@ -1755,8 +1755,8 @@ public class CollectionUtils {
* @param collection the collection whose contents are the target of the {@code retainAll} operation
* @param retain the collection containing the elements to be retained in the returned collection
* @param equator the Equator used for testing equality
- * @return a Collection
containing all the elements of collection
- * that occur at least once in retain
according to the equator
+ * @return a {@code Collection} containing all the elements of {@code collection}
+ * that occur at least once in {@code retain} according to the {@code equator}
* @throws NullPointerException if any of the parameters is null
* @since 4.1
*/
@@ -1845,26 +1845,26 @@ public class CollectionUtils {
}
/**
- * Removes the elements in remove
from collection
. That is, this
- * method returns a collection containing all the elements in c
- * that are not in remove
. The cardinality of an element e
- * in the returned collection is the same as the cardinality of e
- * in collection
unless remove
contains e
, in which
+ * Removes the elements in {@code remove} from {@code collection}. That is, this
+ * method returns a collection containing all the elements in {@code c}
+ * that are not in {@code remove}. The cardinality of an element {@code e}
+ * in the returned collection is the same as the cardinality of {@code e}
+ * in {@code collection} unless {@code remove} contains {@code e}, in which
* case the cardinality is zero. This method is useful if you do not wish to modify
- * the collection c
and thus cannot call collection.removeAll(remove);
.
+ * the collection {@code c} and thus cannot call {@code collection.removeAll(remove);}.
*
- * This implementation iterates over collection
, checking each element in
- * turn to see if it's contained in remove
. If it's not contained, it's added
+ * This implementation iterates over {@code collection}, checking each element in
+ * turn to see if it's contained in {@code remove}. If it's not contained, it's added
* to the returned list. As a consequence, it is advised to use a collection type for
- * remove
that provides a fast (e.g. O(1)) implementation of
+ * {@code remove} that provides a fast (e.g. O(1)) implementation of
* {@link Collection#contains(Object)}.
*
*
* @param the type of object the {@link Collection} contains
* @param collection the collection from which items are removed (in the returned collection)
- * @param remove the items to be removed from the returned collection
- * @return a Collection
containing all the elements of collection
except
- * any elements that also occur in remove
.
+ * @param remove the items to be removed from the returned {@code collection}
+ * @return a {@code Collection} containing all the elements of {@code collection} except
+ * any elements that also occur in {@code remove}.
* @throws NullPointerException if either parameter is null
* @since 4.0 (method existed in 3.2 but was completely broken)
*/
@@ -1873,19 +1873,19 @@ public class CollectionUtils {
}
/**
- * Removes all elements in remove
from collection
.
+ * Removes all elements in {@code remove} from {@code collection}.
* That is, this method returns a collection containing all the elements in
- * collection
that are not in remove
. The
- * cardinality of an element e
in the returned collection is
- * the same as the cardinality of e
in collection
- * unless remove
contains e
, in which case the
+ * {@code collection} that are not in {@code remove}. The
+ * cardinality of an element {@code e} in the returned collection is
+ * the same as the cardinality of {@code e} in {@code collection}
+ * unless {@code remove} contains {@code e}, in which case the
* cardinality is zero. This method is useful if you do not wish to modify
- * the collection c
and thus cannot call
- * collection.removeAll(remove)
.
+ * the collection {@code c} and thus cannot call
+ * {@code collection.removeAll(remove)}.
*
* Moreover this method uses an {@link Equator} instead of
* {@link Object#equals(Object)} to determine the equality of the elements
- * in collection
and remove
. Hence this method is
+ * in {@code collection} and {@code remove}. Hence this method is
* useful in cases where the equals behavior of an object needs to be
* modified without changing the object itself.
*
@@ -1894,8 +1894,8 @@ public class CollectionUtils {
* @param collection the collection from which items are removed (in the returned collection)
* @param remove the items to be removed from the returned collection
* @param equator the Equator used for testing equality
- * @return a Collection
containing all the elements of collection
- * except any element that if equal according to the equator
+ * @return a {@code Collection} containing all the elements of {@code collection}
+ * except any element that if equal according to the {@code equator}
* @throws NullPointerException if any of the parameters is null
* @since 4.1
*/
diff --git a/src/main/java/org/apache/commons/collections4/ComparatorUtils.java b/src/main/java/org/apache/commons/collections4/ComparatorUtils.java
index c5a374342..14592049e 100644
--- a/src/main/java/org/apache/commons/collections4/ComparatorUtils.java
+++ b/src/main/java/org/apache/commons/collections4/ComparatorUtils.java
@@ -32,9 +32,9 @@ import org.apache.commons.collections4.comparators.TransformingComparator;
* objects.
*
* Most of the functionality in this class can also be found in the
- * comparators
package. This class merely provides a
+ * {@code comparators} package. This class merely provides a
* convenient central place if you have use for more than one class
- * in the comparators
subpackage.
+ * in the {@code comparators} subpackage.
*
*
* @since 2.1
@@ -123,9 +123,9 @@ public class ComparatorUtils {
* The comparator throws NullPointerException if a null value is compared.
*
*
- * @param trueFirst when true
, sort
- * true
{@link Boolean}s before
- * false
{@link Boolean}s.
+ * @param trueFirst when {@code true}, sort
+ * {@code true} {@link Boolean}s before
+ * {@code false} {@link Boolean}s.
* @return a comparator that sorts booleans
*/
public static Comparator booleanComparator(final boolean trueFirst) {
@@ -133,7 +133,7 @@ public class ComparatorUtils {
}
/**
- * Gets a Comparator that controls the comparison of null
values.
+ * Gets a Comparator that controls the comparison of {@code null} values.
*
* The returned comparator will consider a null value to be less than
* any nonnull value, and equal to any other null value. Two nonnull
@@ -154,7 +154,7 @@ public class ComparatorUtils {
}
/**
- * Gets a Comparator that controls the comparison of null
values.
+ * Gets a Comparator that controls the comparison of {@code null} values.
*
* The returned comparator will consider a null value to be greater than
* any nonnull value, and equal to any other null value. Two nonnull
diff --git a/src/main/java/org/apache/commons/collections4/EnumerationUtils.java b/src/main/java/org/apache/commons/collections4/EnumerationUtils.java
index 9c5fabede..224ab53c3 100644
--- a/src/main/java/org/apache/commons/collections4/EnumerationUtils.java
+++ b/src/main/java/org/apache/commons/collections4/EnumerationUtils.java
@@ -36,11 +36,11 @@ public class EnumerationUtils {
private EnumerationUtils() {}
/**
- * Returns the index
-th value in the {@link Enumeration}, throwing
- * IndexOutOfBoundsException
if there is no such element.
+ * Returns the {@code index}-th value in the {@link Enumeration}, throwing
+ * {@code IndexOutOfBoundsException} if there is no such element.
*
- * The Enumeration is advanced to index
(or to the end, if
- * index
exceeds the number of entries) as a side effect of this method.
+ * The Enumeration is advanced to {@code index} (or to the end, if
+ * {@code index} exceeds the number of entries) as a side effect of this method.
*
* @param e the enumeration to get a value from
* @param index the index to get
@@ -70,9 +70,9 @@ public class EnumerationUtils {
* created. The new list is returned.
*
* @param the element type
- * @param enumeration the enumeration to traverse, which should not be null
.
+ * @param enumeration the enumeration to traverse, which should not be {@code null}.
* @return a list containing all elements of the given enumeration
- * @throws NullPointerException if the enumeration parameter is null
.
+ * @throws NullPointerException if the enumeration parameter is {@code null}.
*/
public static List toList(final Enumeration extends E> enumeration) {
return IteratorUtils.toList(new EnumerationIterator<>(enumeration));
diff --git a/src/main/java/org/apache/commons/collections4/Factory.java b/src/main/java/org/apache/commons/collections4/Factory.java
index aa53e10a8..38f6fa78f 100644
--- a/src/main/java/org/apache/commons/collections4/Factory.java
+++ b/src/main/java/org/apache/commons/collections4/Factory.java
@@ -19,7 +19,7 @@ package org.apache.commons.collections4;
/**
* Defines a functor interface implemented by classes that create objects.
*
- * A Factory
creates an object without using an input parameter.
+ * A {@code Factory} creates an object without using an input parameter.
* If an input parameter is required, then {@link Transformer} is more appropriate.
*
*
diff --git a/src/main/java/org/apache/commons/collections4/FactoryUtils.java b/src/main/java/org/apache/commons/collections4/FactoryUtils.java
index b181251c4..b0f3be8ac 100644
--- a/src/main/java/org/apache/commons/collections4/FactoryUtils.java
+++ b/src/main/java/org/apache/commons/collections4/FactoryUtils.java
@@ -22,7 +22,7 @@ import org.apache.commons.collections4.functors.InstantiateFactory;
import org.apache.commons.collections4.functors.PrototypeFactory;
/**
- * FactoryUtils
provides reference implementations and utilities
+ * {@code FactoryUtils} provides reference implementations and utilities
* for the Factory functor interface. The supplied factories are:
*
* - Prototype - clones a specified object
@@ -83,7 +83,7 @@ public class FactoryUtils {
*
* @param the type that the factory creates
* @param constantToReturn the constant object to return each time in the factory
- * @return the
constant
factory.
+ * @return the {@code constant} factory.
*/
public static Factory constantFactory(final T constantToReturn) {
return ConstantFactory.constantFactory(constantToReturn);
@@ -104,7 +104,7 @@ public class FactoryUtils {
*
* @param the type that the factory creates
* @param prototype the object to clone each time in the factory
- * @return the prototype
factory, or a {@link ConstantFactory#NULL_INSTANCE} if
+ * @return the {@code prototype} factory, or a {@link ConstantFactory#NULL_INSTANCE} if
* the {@code prototype} is {@code null}
* @throws IllegalArgumentException if the prototype cannot be cloned
*/
@@ -120,7 +120,7 @@ public class FactoryUtils {
*
* @param the type that the factory creates
* @param classToInstantiate the Class to instantiate each time in the factory
- * @return the reflection
factory
+ * @return the {@code reflection} factory
* @throws NullPointerException if the classToInstantiate is null
*/
public static Factory instantiateFactory(final Class classToInstantiate) {
@@ -137,7 +137,7 @@ public class FactoryUtils {
* @param classToInstantiate the Class to instantiate each time in the factory
* @param paramTypes parameter types for the constructor, can be null
* @param args the arguments to pass to the constructor, can be null
- * @return the reflection
factory
+ * @return the {@code reflection} factory
* @throws NullPointerException if the classToInstantiate is null
* @throws IllegalArgumentException if the paramTypes and args don't match
* @throws IllegalArgumentException if the constructor doesn't exist
diff --git a/src/main/java/org/apache/commons/collections4/FluentIterable.java b/src/main/java/org/apache/commons/collections4/FluentIterable.java
index 0bf1dbb9f..53f57a991 100644
--- a/src/main/java/org/apache/commons/collections4/FluentIterable.java
+++ b/src/main/java/org/apache/commons/collections4/FluentIterable.java
@@ -380,7 +380,7 @@ public class FluentIterable implements Iterable {
* Checks if all elements contained in this iterable are matching the
* provided predicate.
*
- * A null
or empty iterable returns true.
+ * A {@code null} or empty iterable returns true.
*
* @param predicate the predicate to use, may not be null
* @return true if all elements contained in this iterable match the predicate,
@@ -394,7 +394,7 @@ public class FluentIterable implements Iterable {
/**
* Checks if this iterable contains any element matching the provided predicate.
*
- * A null
or empty iterable returns false.
+ * A {@code null} or empty iterable returns false.
*
* @param predicate the predicate to use, may not be null
* @return true if at least one element contained in this iterable matches the predicate,
diff --git a/src/main/java/org/apache/commons/collections4/FunctorException.java b/src/main/java/org/apache/commons/collections4/FunctorException.java
index a61d47b43..8b8db71e7 100644
--- a/src/main/java/org/apache/commons/collections4/FunctorException.java
+++ b/src/main/java/org/apache/commons/collections4/FunctorException.java
@@ -28,7 +28,7 @@ public class FunctorException extends RuntimeException {
private static final long serialVersionUID = -4704772662059351193L;
/**
- * Constructs a new FunctorException
without specified
+ * Constructs a new {@code FunctorException} without specified
* detail message.
*/
public FunctorException() {
@@ -36,7 +36,7 @@ public class FunctorException extends RuntimeException {
}
/**
- * Constructs a new FunctorException
with specified
+ * Constructs a new {@code FunctorException} with specified
* detail message.
*
* @param msg the error message.
@@ -46,8 +46,8 @@ public class FunctorException extends RuntimeException {
}
/**
- * Constructs a new FunctorException
with specified
- * nested Throwable
root cause.
+ * Constructs a new {@code FunctorException} with specified
+ * nested {@code Throwable} root cause.
*
* @param rootCause the exception or error that caused this exception
* to be thrown.
@@ -57,8 +57,8 @@ public class FunctorException extends RuntimeException {
}
/**
- * Constructs a new FunctorException
with specified
- * detail message and nested Throwable
root cause.
+ * Constructs a new {@code FunctorException} with specified
+ * detail message and nested {@code Throwable} root cause.
*
* @param msg the error message.
* @param rootCause the exception or error that caused this exception
diff --git a/src/main/java/org/apache/commons/collections4/Get.java b/src/main/java/org/apache/commons/collections4/Get.java
index 1892da8e2..5c590e7dd 100644
--- a/src/main/java/org/apache/commons/collections4/Get.java
+++ b/src/main/java/org/apache/commons/collections4/Get.java
@@ -32,7 +32,7 @@ public interface Get {
/**
* @param key key whose presence in this map is to be tested
- * @return true
if this map contains a mapping for the specified
+ * @return {@code true} if this map contains a mapping for the specified
* key
* @see java.util.Map#containsKey(Object)
*/
@@ -40,7 +40,7 @@ public interface Get {
/**
* @param value value whose presence in this map is to be tested
- * @return true
if this map maps one or more keys to the
+ * @return {@code true} if this map maps one or more keys to the
* specified value
* @see java.util.Map#containsValue(Object)
*/
@@ -62,14 +62,14 @@ public interface Get {
/**
* @param key key whose mapping is to be removed from the map
- * @return the previous value associated with key
, or
- * null
if there was no mapping for key
.
+ * @return the previous value associated with {@code key}, or
+ * {@code null} if there was no mapping for {@code key}.
* @see java.util.Map#remove(Object)
*/
V remove(Object key);
/**
- * @return true
if this map contains no key-value mappings
+ * @return {@code true} if this map contains no key-value mappings
* @see java.util.Map#isEmpty()
*/
boolean isEmpty();
diff --git a/src/main/java/org/apache/commons/collections4/IterableGet.java b/src/main/java/org/apache/commons/collections4/IterableGet.java
index e7012fd98..39b7bcab7 100644
--- a/src/main/java/org/apache/commons/collections4/IterableGet.java
+++ b/src/main/java/org/apache/commons/collections4/IterableGet.java
@@ -27,7 +27,7 @@ package org.apache.commons.collections4;
*/
public interface IterableGet extends Get {
/**
- * Obtains a MapIterator
over the map.
+ * Obtains a {@code MapIterator} over the map.
*
* A map iterator is an efficient way of iterating over maps.
* There is no need to access the entry set or use Map Entry objects.
diff --git a/src/main/java/org/apache/commons/collections4/IterableUtils.java b/src/main/java/org/apache/commons/collections4/IterableUtils.java
index cce857c29..0e3bcb444 100644
--- a/src/main/java/org/apache/commons/collections4/IterableUtils.java
+++ b/src/main/java/org/apache/commons/collections4/IterableUtils.java
@@ -599,7 +599,7 @@ public class IterableUtils {
/**
* Finds the first element in the given iterable which matches the given predicate.
*
- * A null
or empty iterator returns null.
+ * A {@code null} or empty iterator returns null.
*
* @param the element type
* @param iterable the iterable to search, may be null
@@ -615,7 +615,7 @@ public class IterableUtils {
* Returns the index of the first element in the specified iterable that
* matches the given predicate.
*
- * A null
or empty iterable returns -1.
+ * A {@code null} or empty iterable returns -1.
*
* @param the element type
* @param iterable the iterable to search, may be null
@@ -630,7 +630,7 @@ public class IterableUtils {
/**
* Answers true if a predicate is true for every element of an iterable.
*
- * A null
or empty iterable returns true.
+ * A {@code null} or empty iterable returns true.
*
* @param the type of object the {@link Iterable} contains
* @param iterable the {@link Iterable} to use, may be null
@@ -646,7 +646,7 @@ public class IterableUtils {
/**
* Answers true if a predicate is true for any element of the iterable.
*
- * A null
or empty iterable returns false.
+ * A {@code null} or empty iterable returns false.
*
* @param the type of object the {@link Iterable} contains
* @param iterable the {@link Iterable} to use, may be null
@@ -661,7 +661,7 @@ public class IterableUtils {
/**
* Counts the number of elements in the input iterable that match the predicate.
*
- * A null
iterable matches no elements.
+ * A {@code null} iterable matches no elements.
*
* @param the type of object the {@link Iterable} contains
* @param input the {@link Iterable} to get the input from, may be null
@@ -677,7 +677,7 @@ public class IterableUtils {
/**
* Answers true if the provided iterable is empty.
*
- * A null
iterable returns true.
+ * A {@code null} iterable returns true.
*
* @param iterable the {@link Iterable to use}, may be null
* @return true if the iterable is null or empty, false otherwise
@@ -692,7 +692,7 @@ public class IterableUtils {
/**
* Checks if the object is contained in the given iterable.
*
- * A null
or empty iterable returns false.
+ * A {@code null} or empty iterable returns false.
*
* @param the type of object the {@link Iterable} contains
* @param iterable the iterable to check, may be null
@@ -711,8 +711,8 @@ public class IterableUtils {
* is tested with an {@code equator} unlike {@link #contains(Iterable, Object)}
* which uses {@link Object#equals(Object)}.
*
- * A null
or empty iterable returns false.
- * A null
object will not be passed to the equator, instead a
+ * A {@code null} or empty iterable returns false.
+ * A {@code null} object will not be passed to the equator, instead a
* {@link org.apache.commons.collections4.functors.NullPredicate NullPredicate}
* will be used.
*
@@ -749,8 +749,8 @@ public class IterableUtils {
}
/**
- * Returns the index
-th value in the iterable
's {@link Iterator}, throwing
- * IndexOutOfBoundsException
if there is no such element.
+ * Returns the {@code index}-th value in the {@code iterable}'s {@link Iterator}, throwing
+ * {@code IndexOutOfBoundsException} if there is no such element.
*
* If the {@link Iterable} is a {@link List}, then it will use {@link List#get(int)}.
*
@@ -771,8 +771,8 @@ public class IterableUtils {
/**
* Shortcut for {@code get(iterator, 0)}.
*
- * Returns the first
value in the iterable
's {@link Iterator}, throwing
- * IndexOutOfBoundsException
if there is no such element.
+ * Returns the {@code first} value in the {@code iterable}'s {@link Iterator}, throwing
+ * {@code IndexOutOfBoundsException} if there is no such element.
*
*
* If the {@link Iterable} is a {@link List}, then it will use {@link List#get(int)}.
@@ -791,7 +791,7 @@ public class IterableUtils {
/**
* Returns the number of elements contained in the given iterator.
*
- * A null
or empty iterator returns {@code 0}.
+ * A {@code null} or empty iterator returns {@code 0}.
*
* @param iterable the iterable to check, may be null
* @return the number of elements contained in the iterable
@@ -818,7 +818,7 @@ public class IterableUtils {
* R = collection of elements rejected by all predicates
*
*
- * If the input iterable is null
, the same is returned as for an
+ * If the input iterable is {@code null}, the same is returned as for an
* empty iterable.
*
* Example: for an input list [1, 2, 3, 4, 5] calling partition with a predicate [x < 3]
@@ -860,7 +860,7 @@ public class IterableUtils {
* Note: elements are only added to the output collection of the first matching
* predicate, determined by the order of arguments.
*
- * If the input iterable is null
, the same is returned as for an
+ * If the input iterable is {@code null}, the same is returned as for an
* empty iterable.
*
* Example: for an input list [1, 2, 3, 4, 5] calling partition with predicates [x < 3]
@@ -900,7 +900,7 @@ public class IterableUtils {
* Note: elements are only added to the output collection of the first matching
* predicate, determined by the order of arguments.
*
- * If the input iterable is null
, the same is returned as for an
+ * If the input iterable is {@code null}, the same is returned as for an
* empty iterable.
* If no predicates have been provided, all elements of the input collection
* will be added to the rejected collection.
@@ -1069,12 +1069,12 @@ public class IterableUtils {
}
/**
- * Returns an empty iterator if the argument is null
,
+ * Returns an empty iterator if the argument is {@code null},
* or {@code iterable.iterator()} otherwise.
*
* @param the element type
- * @param iterable the iterable, possibly null
- * @return an empty iterator if the argument is null
+ * @param iterable the iterable, possibly {@code null}
+ * @return an empty iterator if the argument is {@code null}
*/
private static Iterator emptyIteratorIfNull(final Iterable iterable) {
return iterable != null ? iterable.iterator() : IteratorUtils.emptyIterator();
diff --git a/src/main/java/org/apache/commons/collections4/IteratorUtils.java b/src/main/java/org/apache/commons/collections4/IteratorUtils.java
index d22b0e906..29296a9a2 100644
--- a/src/main/java/org/apache/commons/collections4/IteratorUtils.java
+++ b/src/main/java/org/apache/commons/collections4/IteratorUtils.java
@@ -556,9 +556,9 @@ public class IteratorUtils {
* Gets an iterator that provides an ordered iteration over the elements
* contained in a collection of ordered {@link Iterator}s.
*
- * Given two ordered {@link Iterator}s A
and B
,
+ * Given two ordered {@link Iterator}s {@code A} and {@code B},
* the {@link Iterator#next()} method will return the lesser of
- * A.next()
and B.next()
.
+ * {@code A.next()} and {@code B.next()}.
*
* The comparator is optional. If null is specified then natural order is used.
*
@@ -582,9 +582,9 @@ public class IteratorUtils {
* Gets an iterator that provides an ordered iteration over the elements
* contained in an array of {@link Iterator}s.
*
- * Given two ordered {@link Iterator}s A
and B
,
+ * Given two ordered {@link Iterator}s {@code A} and {@code B},
* the {@link Iterator#next()} method will return the lesser of
- * A.next()
and B.next()
and so on.
+ * {@code A.next()} and {@code B.next()} and so on.
*
* The comparator is optional. If null is specified then natural order is used.
*
@@ -606,9 +606,9 @@ public class IteratorUtils {
* Gets an iterator that provides an ordered iteration over the elements
* contained in a collection of {@link Iterator}s.
*
- * Given two ordered {@link Iterator}s A
and B
,
+ * Given two ordered {@link Iterator}s {@code A} and {@code B},
* the {@link Iterator#next()} method will return the lesser of
- * A.next()
and B.next()
and so on.
+ * {@code A.next()} and {@code B.next()} and so on.
*
* The comparator is optional. If null is specified then natural order is used.
*
@@ -634,8 +634,8 @@ public class IteratorUtils {
*
* This iterator can extract multiple objects from a complex tree-like object graph.
* The iteration starts from a single root object.
- * It uses a Transformer
to extract the iterators and elements.
- * Its main benefit is that no intermediate List
is created.
+ * It uses a {@code Transformer} to extract the iterators and elements.
+ * Its main benefit is that no intermediate {@code List} is created.
*
* For example, consider an object graph:
*
@@ -649,7 +649,7 @@ public class IteratorUtils {
* |- Tree | /- Leaf
* |- Branch -- Leaf
* |- Branch -- Leaf
- * The following Transformer
, used in this class, will extract all
+ * The following {@code Transformer}, used in this class, will extract all
* the Leaf objects without creating a combined intermediate list:
*
* public Object transform(Object input) {
@@ -1207,7 +1207,7 @@ public class IteratorUtils {
/**
* Finds the first element in the given iterator which matches the given predicate.
*
- * A null
or empty iterator returns null.
+ * A {@code null} or empty iterator returns null.
*
* @param the element type
* @param iterator the iterator to search, may be null
@@ -1234,7 +1234,7 @@ public class IteratorUtils {
* Returns the index of the first element in the specified iterator that
* matches the given predicate.
*
- * A null
or empty iterator returns -1.
+ * A {@code null} or empty iterator returns -1.
*
* @param the element type
* @param iterator the iterator to search, may be null
@@ -1260,7 +1260,7 @@ public class IteratorUtils {
/**
* Answers true if a predicate is true for any element of the iterator.
*
- * A null
or empty iterator returns false.
+ * A {@code null} or empty iterator returns false.
*
* @param the type of object the {@link Iterator} contains
* @param iterator the {@link Iterator} to use, may be null
@@ -1276,7 +1276,7 @@ public class IteratorUtils {
/**
* Answers true if a predicate is true for every element of an iterator.
*
- * A null
or empty iterator returns true.
+ * A {@code null} or empty iterator returns true.
*
* @param the type of object the {@link Iterator} contains
* @param iterator the {@link Iterator} to use, may be null
@@ -1303,7 +1303,7 @@ public class IteratorUtils {
/**
* Checks if the given iterator is empty.
*
- * A null
or empty iterator returns true.
+ * A {@code null} or empty iterator returns true.
*
* @param iterator the {@link Iterator} to use, may be null
* @return true if the iterator is exhausted or null, false otherwise
@@ -1316,7 +1316,7 @@ public class IteratorUtils {
/**
* Checks if the object is contained in the given iterator.
*
- * A null
or empty iterator returns false.
+ * A {@code null} or empty iterator returns false.
*
* @param the type of object the {@link Iterator} contains
* @param iterator the iterator to check, may be null
@@ -1329,11 +1329,11 @@ public class IteratorUtils {
}
/**
- * Returns the index
-th value in {@link Iterator}, throwing
- * IndexOutOfBoundsException
if there is no such element.
+ * Returns the {@code index}-th value in {@link Iterator}, throwing
+ * {@code IndexOutOfBoundsException} if there is no such element.
*
- * The Iterator is advanced to index
(or to the end, if
- * index
exceeds the number of entries) as a side effect of this method.
+ * The Iterator is advanced to {@code index} (or to the end, if
+ * {@code index} exceeds the number of entries) as a side effect of this method.
*
* @param the type of object in the {@link Iterator}
* @param iterator the iterator to get a value from
@@ -1358,12 +1358,12 @@ public class IteratorUtils {
/**
* Shortcut for {@code get(iterator, 0)}.
*
- * Returns the first
value in {@link Iterator}, throwing
- * IndexOutOfBoundsException
if there is no such element.
+ * Returns the {@code first} value in {@link Iterator}, throwing
+ * {@code IndexOutOfBoundsException} if there is no such element.
*
*
- * The Iterator is advanced to 0
(or to the end, if
- * 0
exceeds the number of entries) as a side effect of this method.
+ * The Iterator is advanced to {@code 0} (or to the end, if
+ * {@code 0} exceeds the number of entries) as a side effect of this method.
*
* @param the type of object in the {@link Iterator}
* @param iterator the iterator to get a value from
@@ -1378,7 +1378,7 @@ public class IteratorUtils {
/**
* Returns the number of elements contained in the given iterator.
*
- * A null
or empty iterator returns {@code 0}.
+ * A {@code null} or empty iterator returns {@code 0}.
*
* @param iterator the iterator to check, may be null
* @return the number of elements contained in the iterator
diff --git a/src/main/java/org/apache/commons/collections4/ListUtils.java b/src/main/java/org/apache/commons/collections4/ListUtils.java
index 493aefda8..3073e4d2f 100644
--- a/src/main/java/org/apache/commons/collections4/ListUtils.java
+++ b/src/main/java/org/apache/commons/collections4/ListUtils.java
@@ -44,19 +44,19 @@ import org.apache.commons.collections4.sequence.SequencesComparator;
public class ListUtils {
/**
- * ListUtils
should not normally be instantiated.
+ * {@code ListUtils} should not normally be instantiated.
*/
private ListUtils() {}
//-----------------------------------------------------------------------
/**
- * Returns an immutable empty list if the argument is null
,
+ * Returns an immutable empty list if the argument is {@code null},
* or the argument itself otherwise.
*
* @param the element type
- * @param list the list, possibly null
- * @return an empty list if the argument is null
+ * @param list the list, possibly {@code null}
+ * @return an empty list if the argument is {@code null}
*/
public static List emptyIfNull(final List list) {
return list == null ? Collections.emptyList() : list;
@@ -69,7 +69,7 @@ public class ListUtils {
* @param the element type
* @param list the list, possibly {@code null}
* @param defaultList the returned values if list is {@code null}
- * @return an empty list if the argument is null
+ * @return an empty list if the argument is {@code null}
* @since 4.0
*/
public static List defaultIfNull(final List list, final List defaultList) {
@@ -170,7 +170,7 @@ public class ListUtils {
* Selects all elements from input collection which match the given
* predicate into an output list.
*
- * A null
predicate matches no elements.
+ * A {@code null} predicate matches no elements.
*
* @param the element type
* @param inputCollection the collection to get the input from, may not be null
@@ -190,7 +190,7 @@ public class ListUtils {
* Selects all elements from inputCollection which don't match the given
* predicate into an output collection.
*
- * If the input predicate is null
, the result is an empty list.
+ * If the input predicate is {@code null}, the result is an empty list.
*
* @param the element type
* @param inputCollection the collection to get the input from, may not be null
@@ -210,7 +210,7 @@ public class ListUtils {
* Tests two lists for value-equality as per the equality contract in
* {@link java.util.List#equals(java.lang.Object)}.
*
- * This method is useful for implementing List
when you cannot
+ * This method is useful for implementing {@code List} when you cannot
* extend AbstractList. The method takes Collection instances to enable other
* collection types to use the List implementation algorithm.
*
@@ -264,7 +264,7 @@ public class ListUtils {
* Generates a hash code using the algorithm specified in
* {@link java.util.List#hashCode()}.
*
- * This method is useful for implementing List
when you cannot
+ * This method is useful for implementing {@code List} when you cannot
* extend AbstractList. The method takes Collection instances to enable other
* collection types to use the List implementation algorithm.
*
@@ -288,24 +288,24 @@ public class ListUtils {
//-----------------------------------------------------------------------
/**
- * Returns a List containing all the elements in collection
- * that are also in retain
. The cardinality of an element e
- * in the returned list is the same as the cardinality of e
- * in collection
unless retain
does not contain e
, in which
+ * Returns a List containing all the elements in {@code collection}
+ * that are also in {@code retain}. The cardinality of an element {@code e}
+ * in the returned list is the same as the cardinality of {@code e}
+ * in {@code collection} unless {@code retain} does not contain {@code e}, in which
* case the cardinality is zero. This method is useful if you do not wish to modify
- * the collection c
and thus cannot call collection.retainAll(retain);
.
+ * the collection {@code c} and thus cannot call {@code collection.retainAll(retain);}.
*
- * This implementation iterates over collection
, checking each element in
- * turn to see if it's contained in retain
. If it's contained, it's added
+ * This implementation iterates over {@code collection}, checking each element in
+ * turn to see if it's contained in {@code retain}. If it's contained, it's added
* to the returned list. As a consequence, it is advised to use a collection type for
- * retain
that provides a fast (e.g. O(1)) implementation of
+ * {@code retain} that provides a fast (e.g. O(1)) implementation of
* {@link Collection#contains(Object)}.
*
* @param the element type
* @param collection the collection whose contents are the target of the #retailAll operation
* @param retain the collection containing the elements to be retained in the returned collection
- * @return a List
containing all the elements of c
- * that occur at least once in retain
.
+ * @return a {@code List} containing all the elements of {@code c}
+ * that occur at least once in {@code retain}.
* @throws NullPointerException if either parameter is null
* @since 3.2
*/
@@ -321,25 +321,25 @@ public class ListUtils {
}
/**
- * Removes the elements in remove
from collection
. That is, this
- * method returns a list containing all the elements in collection
- * that are not in remove
. The cardinality of an element e
- * in the returned collection is the same as the cardinality of e
- * in collection
unless remove
contains e
, in which
+ * Removes the elements in {@code remove} from {@code collection}. That is, this
+ * method returns a list containing all the elements in {@code collection}
+ * that are not in {@code remove}. The cardinality of an element {@code e}
+ * in the returned collection is the same as the cardinality of {@code e}
+ * in {@code collection} unless {@code remove} contains {@code e}, in which
* case the cardinality is zero. This method is useful if you do not wish to modify
- * collection
and thus cannot call collection.removeAll(remove);
.
+ * {@code collection} and thus cannot call {@code collection.removeAll(remove);}.
*
- * This implementation iterates over collection
, checking each element in
- * turn to see if it's contained in remove
. If it's not contained, it's added
+ * This implementation iterates over {@code collection}, checking each element in
+ * turn to see if it's contained in {@code remove}. If it's not contained, it's added
* to the returned list. As a consequence, it is advised to use a collection type for
- * remove
that provides a fast (e.g. O(1)) implementation of
+ * {@code remove} that provides a fast (e.g. O(1)) implementation of
* {@link Collection#contains(Object)}.
*
* @param the element type
* @param collection the collection from which items are removed (in the returned collection)
- * @param remove the items to be removed from the returned collection
- * @return a List
containing all the elements of c
except
- * any elements that also occur in remove
.
+ * @param remove the items to be removed from the returned {@code collection}
+ * @return a {@code List} containing all the elements of {@code c} except
+ * any elements that also occur in {@code remove}.
* @throws NullPointerException if either parameter is null
* @since 3.2
*/
@@ -457,10 +457,10 @@ public class ListUtils {
* Date date = lazy.get(3);
*
*
- * After the above code is executed, date
will refer to
- * a new Date
instance. Furthermore, that Date
+ * After the above code is executed, {@code date} will refer to
+ * a new {@code Date} instance. Furthermore, that {@code Date}
* instance is the fourth element in the list. The first, second,
- * and third element are all set to null
.
+ * and third element are all set to {@code null}.
*
* @param the element type
* @param list the list to make lazy, must not be null
@@ -488,10 +488,10 @@ public class ListUtils {
* Date date = lazy.get(3);
*
*
- * After the above code is executed, date
will refer to
- * a new Date
instance. Furthermore, that Date
+ * After the above code is executed, {@code date} will refer to
+ * a new {@code Date} instance. Furthermore, that {@code Date}
* instance is the fourth element in the list. The first, second,
- * and third element are all set to null
.
+ * and third element are all set to {@code null}.
*
* @param the element type
* @param list the list to make lazy, must not be null
diff --git a/src/main/java/org/apache/commons/collections4/MapIterator.java b/src/main/java/org/apache/commons/collections4/MapIterator.java
index bc9115865..7a86a5dc8 100644
--- a/src/main/java/org/apache/commons/collections4/MapIterator.java
+++ b/src/main/java/org/apache/commons/collections4/MapIterator.java
@@ -19,7 +19,7 @@ package org.apache.commons.collections4;
import java.util.Iterator;
/**
- * Defines an iterator that operates over a Map
.
+ * Defines an iterator that operates over a {@code Map}.
*
* This iterator is a special version designed for maps. It can be more
* efficient to use this rather than an entry set iterator where the option
@@ -31,8 +31,8 @@ import java.util.Iterator;
*
*
* In use, this iterator iterates through the keys in the map. After each call
- * to next()
, the getValue()
method provides direct
- * access to the value. The value can also be set using setValue()
.
+ * to {@code next()}, the {@code getValue()} method provides direct
+ * access to the value. The value can also be set using {@code setValue()}.
*
* {@code
* MapIterator it = map.mapIterator();
@@ -52,13 +52,13 @@ public interface MapIterator extends Iterator {
/**
* Checks to see if there are more entries still to be iterated.
*
- * @return true
if the iterator has more elements
+ * @return {@code true} if the iterator has more elements
*/
@Override
boolean hasNext();
/**
- * Gets the next key from the Map
.
+ * Gets the next key from the {@code Map}.
*
* @return the next key in the iteration
* @throws java.util.NoSuchElementException if the iteration is finished
@@ -69,32 +69,32 @@ public interface MapIterator extends Iterator {
//-----------------------------------------------------------------------
/**
* Gets the current key, which is the key returned by the last call
- * to next()
.
+ * to {@code next()}.
*
* @return the current key
- * @throws IllegalStateException if next()
has not yet been called
+ * @throws IllegalStateException if {@code next()} has not yet been called
*/
K getKey();
/**
* Gets the current value, which is the value associated with the last key
- * returned by next()
.
+ * returned by {@code next()}.
*
* @return the current value
- * @throws IllegalStateException if next()
has not yet been called
+ * @throws IllegalStateException if {@code next()} has not yet been called
*/
V getValue();
//-----------------------------------------------------------------------
/**
- * Removes the last returned key from the underlying Map
(optional operation).
+ * Removes the last returned key from the underlying {@code Map} (optional operation).
*
- * This method can be called once per call to next()
.
+ * This method can be called once per call to {@code next()}.
*
* @throws UnsupportedOperationException if remove is not supported by the map
- * @throws IllegalStateException if next()
has not yet been called
- * @throws IllegalStateException if remove()
has already been called
- * since the last call to next()
+ * @throws IllegalStateException if {@code next()} has not yet been called
+ * @throws IllegalStateException if {@code remove()} has already been called
+ * since the last call to {@code next()}
*/
@Override
void remove();
@@ -105,9 +105,9 @@ public interface MapIterator extends Iterator {
* @param value the new value
* @return the previous value
* @throws UnsupportedOperationException if setValue is not supported by the map
- * @throws IllegalStateException if next()
has not yet been called
- * @throws IllegalStateException if remove()
has been called since the
- * last call to next()
+ * @throws IllegalStateException if {@code next()} has not yet been called
+ * @throws IllegalStateException if {@code remove()} has been called since the
+ * last call to {@code next()}
*/
V setValue(V value);
diff --git a/src/main/java/org/apache/commons/collections4/MapUtils.java b/src/main/java/org/apache/commons/collections4/MapUtils.java
index 2570d2023..b89c404d3 100644
--- a/src/main/java/org/apache/commons/collections4/MapUtils.java
+++ b/src/main/java/org/apache/commons/collections4/MapUtils.java
@@ -161,22 +161,22 @@ public class MapUtils {
*
*
* @param out the stream to print to, must not be null
- * @param label The label to be used, may be null
. If null
, the label is not output. It
+ * @param label The label to be used, may be {@code null}. If {@code null}, the label is not output. It
* typically represents the name of the property in a bean or similar.
- * @param map The map to print, may be null
. If null
, the text 'null' is output.
- * @throws NullPointerException if the stream is null
+ * @param map The map to print, may be {@code null}. If {@code null}, the text 'null' is output.
+ * @throws NullPointerException if the stream is {@code null}
*/
public static void debugPrint(final PrintStream out, final Object label, final Map, ?> map) {
verbosePrintInternal(out, label, map, new ArrayDeque
*
*
- * After the above code is executed, obj
will contain a new Date
instance. Furthermore,
- * that Date
instance is the value for the "test"
key in the map.
+ * After the above code is executed, {@code obj} will contain a new {@code Date} instance. Furthermore,
+ * that {@code Date} instance is the value for the {@code "test"} key in the map.
*
*
* @param the key type
@@ -1320,8 +1320,8 @@ public class MapUtils {
*
*
*
- * After the above code is executed, obj
will contain a new File
instance for the C drive
- * dev directory. Furthermore, that File
instance is the value for the "C:/dev"
key in the
+ * After the above code is executed, {@code obj} will contain a new {@code File} instance for the C drive
+ * dev directory. Furthermore, that {@code File} instance is the value for the {@code "C:/dev"} key in the
* map.
*
*
@@ -1361,8 +1361,8 @@ public class MapUtils {
* Object obj = lazy.get("test");
*
*
- * After the above code is executed, obj
will contain a new Date
instance. Furthermore,
- * that Date
instance is the value for the "test"
key.
+ * After the above code is executed, {@code obj} will contain a new {@code Date} instance. Furthermore,
+ * that {@code Date} instance is the value for the {@code "test"} key.
*
*
* @param the key type
@@ -1396,8 +1396,8 @@ public class MapUtils {
* Object obj = lazy.get("C:/dev");
*
*
- * After the above code is executed, obj
will contain a new File
instance for the C drive
- * dev directory. Furthermore, that File
instance is the value for the "C:/dev"
key in the
+ * After the above code is executed, {@code obj} will contain a new {@code File} instance for the C drive
+ * dev directory. Furthermore, that {@code File} instance is the value for the {@code "C:/dev"} key in the
* map.
*
*
@@ -1493,15 +1493,15 @@ public class MapUtils {
}
/**
- * Populates a Map using the supplied Transformer
s to transform the elements into keys and values.
+ * Populates a Map using the supplied {@code Transformer}s to transform the elements into keys and values.
*
* @param the key type
* @param the value type
* @param the type of object contained in the {@link Iterable}
- * @param map the Map
to populate.
- * @param elements the Iterable
containing the input values for the map.
- * @param keyTransformer the Transformer
used to transform the element into a key value
- * @param valueTransformer the Transformer
used to transform the element into a value
+ * @param map the {@code Map} to populate.
+ * @param elements the {@code Iterable} containing the input values for the map.
+ * @param keyTransformer the {@code Transformer} used to transform the element into a key value
+ * @param valueTransformer the {@code Transformer} used to transform the element into a value
* @throws NullPointerException if the map, elements or transformers are null
*/
public static void populateMap(final Map map, final Iterable extends E> elements,
@@ -1514,14 +1514,14 @@ public class MapUtils {
}
/**
- * Populates a Map using the supplied Transformer
to transform the elements into keys, using the
- * unaltered element as the value in the Map
.
+ * Populates a Map using the supplied {@code Transformer} to transform the elements into keys, using the
+ * unaltered element as the value in the {@code Map}.
*
* @param the key type
* @param the value type
- * @param map the Map
to populate.
- * @param elements the Iterable
containing the input values for the map.
- * @param keyTransformer the Transformer
used to transform the element into a key value
+ * @param map the {@code Map} to populate.
+ * @param elements the {@code Iterable} containing the input values for the map.
+ * @param keyTransformer the {@code Transformer} used to transform the element into a key value
* @throws NullPointerException if the map, elements or transformer are null
*/
public static void populateMap(final Map map, final Iterable extends V> elements,
@@ -1530,15 +1530,15 @@ public class MapUtils {
}
/**
- * Populates a MultiMap using the supplied Transformer
s to transform the elements into keys and values.
+ * Populates a MultiMap using the supplied {@code Transformer}s to transform the elements into keys and values.
*
* @param the key type
* @param the value type
* @param the type of object contained in the {@link Iterable}
- * @param map the MultiMap
to populate.
- * @param elements the Iterable
containing the input values for the map.
- * @param keyTransformer the Transformer
used to transform the element into a key value
- * @param valueTransformer the Transformer
used to transform the element into a value
+ * @param map the {@code MultiMap} to populate.
+ * @param elements the {@code Iterable} containing the input values for the map.
+ * @param keyTransformer the {@code Transformer} used to transform the element into a key value
+ * @param valueTransformer the {@code Transformer} used to transform the element into a value
* @throws NullPointerException if the map, collection or transformers are null
*/
public static void populateMap(final MultiMap map, final Iterable extends E> elements,
@@ -1551,14 +1551,14 @@ public class MapUtils {
}
/**
- * Populates a MultiMap using the supplied Transformer
to transform the elements into keys, using the
- * unaltered element as the value in the MultiMap
.
+ * Populates a MultiMap using the supplied {@code Transformer} to transform the elements into keys, using the
+ * unaltered element as the value in the {@code MultiMap}.
*
* @param the key type
* @param the value type
- * @param map the MultiMap
to populate.
- * @param elements the Iterable
to use as input values for the map.
- * @param keyTransformer the Transformer
used to transform the element into a key value
+ * @param map the {@code MultiMap} to populate.
+ * @param elements the {@code Iterable} to use as input values for the map.
+ * @param keyTransformer the {@code Transformer} used to transform the element into a key value
* @throws NullPointerException if the map, elements or transformer are null
*/
public static void populateMap(final MultiMap map, final Iterable extends V> elements,
@@ -1957,10 +1957,10 @@ public class MapUtils {
*
*
* @param out the stream to print to, must not be null
- * @param label The label to be used, may be null
. If null
, the label is not output. It
+ * @param label The label to be used, may be {@code null}. If {@code null}, the label is not output. It
* typically represents the name of the property in a bean or similar.
- * @param map The map to print, may be null
. If null
, the text 'null' is output.
- * @throws NullPointerException if the stream is null
+ * @param map The map to print, may be {@code null}. If {@code null}, the text 'null' is output.
+ * @throws NullPointerException if the stream is {@code null}
*/
public static void verbosePrint(final PrintStream out, final Object label, final Map, ?> map) {
verbosePrintInternal(out, label, map, new ArrayDeque