diff --git a/src/main/java/org/apache/commons/collections4/ArrayStack.java b/src/main/java/org/apache/commons/collections4/ArrayStack.java index d46fb7917..f6d5b90f7 100644 --- a/src/main/java/org/apache/commons/collections4/ArrayStack.java +++ b/src/main/java/org/apache/commons/collections4/ArrayStack.java @@ -26,7 +26,7 @@ import java.util.EmptyStackException; * is therefore operates faster in environments where you do not need to * worry about multiple thread contention. *
- * The removal order of an
* This method exists for compatibility with
- * NOTE: This interface violates the {@link Collection} contract.
+ * 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
* Since this method always increases the size of the bag,
- * according to the {@link Collection#add(Object)} contract, it
+ * according to the {@link Collection#add(Object)} contract, it
* should always return
* If the number of copies to remove is greater than the actual number of
* copies in the Bag, no error is thrown.
- *
+ *
* @param object the object to remove
* @param nCopies the number of copies to remove
* @return
* Uniqueness constraints are the same as those in {@link java.util.Set}.
- *
+ *
* @return the Set of unique Bag elements
*/
Set The {@link Collection#removeAll(Collection)} method specifies
* that cardinality should not be respected; this method should
- * remove all occurrences of every object contained in the
+ * remove all occurrences of every object contained in the
* given collection.
*
* @param coll the collection to remove
@@ -177,7 +177,7 @@ public interface Bag The {@link Collection#retainAll(Collection)} method specifies
* that cardinality should not be respected; this method should
- * keep all occurrences of every object contained in the
+ * keep all occurrences of every object contained in the
* given collection.
*
* @param coll the collection to retain
@@ -189,7 +189,7 @@ public interface Bag
* It is imperative that the user manually synchronize on the returned bag
* when iterating over it:
- *
+ *
*
* Existing entries in the specified bag will not be transformed.
* If you want that behaviour, see {@link TransformedBag#transformedBag(Bag, Transformer)}.
- *
+ *
* @param
* It is imperative that the user manually synchronize on the returned bag
* when iterating over it:
- *
+ *
*
* This map enforces the restriction that there is a 1:1 relation between
- * keys and values, meaning that multiple keys cannot map to the same value.
- * This is required so that "inverting" the map results in a map without
+ * keys and values, meaning that multiple keys cannot map to the same value.
+ * This is required so that "inverting" the map results in a map without
* duplicate keys. See the {@link #put} method description for more information.
*
* @param
- * The size of the collection can vary, but it can never exceed a preset
+ * The size of the collection can vary, but it can never exceed a preset
* maximum number of elements. This interface allows the querying of details
* associated with the maximum number of elements.
*
diff --git a/src/main/java/org/apache/commons/collections4/BoundedMap.java b/src/main/java/org/apache/commons/collections4/BoundedMap.java
index 597e93c2c..ec58f46af 100644
--- a/src/main/java/org/apache/commons/collections4/BoundedMap.java
+++ b/src/main/java/org/apache/commons/collections4/BoundedMap.java
@@ -19,7 +19,7 @@ package org.apache.commons.collections4;
/**
* Defines a map that is bounded in size.
*
- * The size of the map can vary, but it can never exceed a preset
+ * The size of the map can vary, but it can never exceed a preset
* maximum number of elements. This interface allows the querying of details
* associated with the maximum number of elements.
*
diff --git a/src/main/java/org/apache/commons/collections4/ComparatorUtils.java b/src/main/java/org/apache/commons/collections4/ComparatorUtils.java
index db4ff7b8a..f8fe3ced1 100644
--- a/src/main/java/org/apache/commons/collections4/ComparatorUtils.java
+++ b/src/main/java/org/apache/commons/collections4/ComparatorUtils.java
@@ -30,8 +30,8 @@ import org.apache.commons.collections4.comparators.TransformingComparator;
* Provides convenient static utility methods for
- * Most of the functionality in this class can also be found in the
- *
* The comparator throws NullPointerException if a null value is compared.
- *
- * @param trueFirst when
@@ -219,7 +219,7 @@ public class ComparatorUtils {
}
/**
- * Returns the smaller of the given objects according to the given
+ * Returns the smaller of the given objects according to the given
* comparator, returning the second object if the comparator
* returns equal.
*
@@ -239,8 +239,8 @@ public class ComparatorUtils {
}
/**
- * Returns the larger of the given objects according to the given
- * comparator, returning the second object if the comparator
+ * Returns the larger of the given objects according to the given
+ * comparator, returning the second object if the comparator
* returns equal.
*
* @param As the enumeration is traversed, an ArrayList of its values is
* created. The new list is returned.
* A
* A ordered map iterator is an efficient way of iterating over maps
* in both directions.
- *
+ *
* @return a map iterator
*/
OrderedMapIterator
* Each object is passed through the transformer as it is added to the
- * Queue. It is important not to use the original queue after invoking this
+ * Queue. It is important not to use the original queue after invoking this
* method, as it is a backdoor for adding untransformed objects.
*
* Existing entries in the specified queue will not be transformed.
diff --git a/src/main/java/org/apache/commons/collections4/ResettableIterator.java b/src/main/java/org/apache/commons/collections4/ResettableIterator.java
index 85a888768..6f9f0f2cc 100644
--- a/src/main/java/org/apache/commons/collections4/ResettableIterator.java
+++ b/src/main/java/org/apache/commons/collections4/ResettableIterator.java
@@ -18,7 +18,7 @@ package org.apache.commons.collections4;
import java.util.Iterator;
-/**
+/**
* Defines an iterator that can be reset back to an initial state.
*
* This interface allows an iterator to be repeatedly reused.
diff --git a/src/main/java/org/apache/commons/collections4/ResettableListIterator.java b/src/main/java/org/apache/commons/collections4/ResettableListIterator.java
index 1dd7939df..da62371d0 100644
--- a/src/main/java/org/apache/commons/collections4/ResettableListIterator.java
+++ b/src/main/java/org/apache/commons/collections4/ResettableListIterator.java
@@ -18,7 +18,7 @@ package org.apache.commons.collections4;
import java.util.ListIterator;
-/**
+/**
* Defines a list iterator that can be reset back to an initial state.
*
* This interface allows an iterator to be repeatedly reused.
diff --git a/src/main/java/org/apache/commons/collections4/SetUtils.java b/src/main/java/org/apache/commons/collections4/SetUtils.java
index 067582df5..4320af8e2 100644
--- a/src/main/java/org/apache/commons/collections4/SetUtils.java
+++ b/src/main/java/org/apache/commons/collections4/SetUtils.java
@@ -71,11 +71,11 @@ public class SetUtils {
private SetUtils() {}
//-----------------------------------------------------------------------
-
+
/**
* Returns an immutable empty set if the argument is
- * This implementation first checks if the two sets are the same object:
+ * This implementation first checks if the two sets are the same object:
* if so it returns true. Then, it checks if the two sets are
* identical in size; if not, it returns false. If so, it returns
* a.containsAll((Collection) b).
* This method is useful for implementing
- * You must manually synchronize on the returned set's iterator to
+ * You must manually synchronize on the returned set's iterator to
* avoid non-deterministic behavior:
- *
+ *
*
* Each object is passed through the transformer as it is added to the
- * Set. It is important not to use the original set after invoking this
+ * Set. It is important not to use the original set after invoking this
* method, as it is a backdoor for adding untransformed objects.
*
* Existing entries in the specified set will not be transformed.
@@ -229,7 +229,7 @@ public class SetUtils {
public static
- * You must manually synchronize on the returned set's iterator to
+ * You must manually synchronize on the returned set's iterator to
* avoid non-deterministic behavior:
- *
+ *
*
* Only objects that pass the test in the given predicate can be added to the set.
* Trying to add an invalid object results in an IllegalArgumentException.
@@ -310,7 +310,7 @@ public class SetUtils {
* Returns a transformed sorted set backed by the given set.
*
* Each object is passed through the transformer as it is added to the
- * Set. It is important not to use the original set after invoking this
+ * Set. It is important not to use the original set after invoking this
* method, as it is a backdoor for adding untransformed objects.
*
* Existing entries in the specified set will not be transformed.
@@ -326,5 +326,5 @@ public class SetUtils {
final Transformer super E, ? extends E> transformer) {
return TransformedSortedSet.transformingSortedSet(set, transformer);
}
-
+
}
diff --git a/src/main/java/org/apache/commons/collections4/SortedBag.java b/src/main/java/org/apache/commons/collections4/SortedBag.java
index 1051ed3db..11c870075 100644
--- a/src/main/java/org/apache/commons/collections4/SortedBag.java
+++ b/src/main/java/org/apache/commons/collections4/SortedBag.java
@@ -31,21 +31,21 @@ public interface SortedBag
* Implementations should allow a value to be looked up from a key and
* a key to be looked up from a value with equal performance.
- *
+ *
* @param
- * The Map consists of Predicate keys and Transformer values. A transformer
+ * The Map consists of Predicate keys and Transformer values. A transformer
* is called if its matching predicate returns true. Each predicate is evaluated
* until one returns true. If no predicates evaluate to true, the default
- * transformer is called. The default transformer is set in the map with a
+ * transformer is called. The default transformer is set in the map with a
* null key. If no default transformer is set, null will be returned in a default
- * case. The ordering is that of the iterator() method on the entryset collection
+ * case. The ordering is that of the iterator() method on the entryset collection
* of the map.
- *
+ *
* @param the input type
* @param
- * The Map consists of object keys and Transformer values. A transformer
+ * The Map consists of object keys and Transformer values. A transformer
* is called if the input object equals the key. If there is no match, the
* default transformer is called. The default transformer is set in the map
* using a null key. If no default is set, null will be returned in a default case.
- *
+ *
* @param the input type
* @param
* For example,
* Note: The {@link Cursor.Decision#REMOVE} operation is not supported.
- *
+ *
* @param key the key to use in the search
* @param cursor the cursor used throughout the search
- * @return the entry the cursor returned {@link Cursor.Decision#EXIT} on, or null
+ * @return the entry the cursor returned {@link Cursor.Decision#EXIT} on, or null
* if it continued till the end
*/
public Map.Entry
- * The traversal will stop when the cursor returns {@link Cursor.Decision#EXIT},
- * {@link Cursor.Decision#CONTINUE} is used to continue traversing and
- * {@link Cursor.Decision#REMOVE} is used to remove the element that was selected
+ * The traversal will stop when the cursor returns {@link Cursor.Decision#EXIT},
+ * {@link Cursor.Decision#CONTINUE} is used to continue traversing and
+ * {@link Cursor.Decision#REMOVE} is used to remove the element that was selected
* and continue traversing.
*
* {@link Cursor.Decision#REMOVE_AND_EXIT} is used to remove the current element
* and stop traversing.
- *
+ *
* @param cursor the cursor used while traversing the {@link Trie}
- * @return the entry the cursor returned {@link Cursor.Decision#EXIT} on, or null
+ * @return the entry the cursor returned {@link Cursor.Decision#EXIT} on, or null
* if it continued till the end
*/
public Map.Entry
- * In a {@link Trie} with fixed size keys, this is essentially a
+ * In a {@link Trie} with fixed size keys, this is essentially a
* {@link #get(Object)} operation.
*
- * For example, if the {@link Trie} contains 'Anna', 'Anael',
+ * For example, if the {@link Trie} contains 'Anna', 'Anael',
* 'Analu', 'Andreas', 'Andrea', 'Andres', and 'Anatole', then
* a lookup of 'And' would return 'Andreas', 'Andrea', and 'Andres'.
- *
+ *
* @param key the key used in the search
* @return a {@link SortedMap} view of this {@link Trie} with all elements whose
* key is prefixed by the search key
*/
public SortedMap
- * {@link Trie}s with fixed size keys will not support this operation
+ * {@link Trie}s with fixed size keys will not support this operation
* (because all keys are the same length).
*
- * For example, if the {@link Trie} contains 'Anna', 'Anael', 'Analu',
- * 'Andreas', 'Andrea', 'Andres', and 'Anatole', then a lookup for 'Andrey'
+ * For example, if the {@link Trie} contains 'Anna', 'Anael', 'Analu',
+ * 'Andreas', 'Andrea', 'Andres', and 'Anatole', then a lookup for 'Andrey'
* and a length of 4 would return 'Andreas', 'Andrea', and 'Andres'.
- *
+ *
* @param key the key used in the search
* @param length the length of the prefix
* @return a {@link SortedMap} view of this {@link Trie} with all elements whose
* key is prefixed by the search key
*/
public SortedMap
- * {@link Trie}s with fixed size keys will not support this operation
+ * {@link Trie}s with fixed size keys will not support this operation
* (because all keys are the same length).
*
- * For example, if the {@link Trie} contains 'Anna', 'Anael', 'Analu',
- * 'Andreas', 'Andrea', 'Andres', and 'Anatole', then a lookup for
- * 'Hello Andrey Smith', an offset of 6 and a length of 4 would return
+ * For example, if the {@link Trie} contains 'Anna', 'Anael', 'Analu',
+ * 'Andreas', 'Andrea', 'Andres', and 'Anatole', then a lookup for
+ * 'Hello Andrey Smith', an offset of 6 and a length of 4 would return
* 'Andreas', 'Andrea', and 'Andres'.
- *
+ *
* @param key the key used in the search
* @param offset the prefix start
* @param length the length of the prefix
@@ -186,27 +186,27 @@ public interface Trie
* In {@link Trie}s with fixed size keys like IP addresses this method
* can be used to lookup partial keys. That is you can lookup all addresses
- * that begin with '192.168' by providing the key '192.168.X.X' and a
+ * that begin with '192.168' by providing the key '192.168.X.X' and a
* length of 16.
- *
+ *
* @param key the key to use in the search
* @param lengthInBits the number of significant key bits
* @return a {@link SortedMap} view of this {@link Trie} with all elements whose
* key is prefixed by the search key
*/
public SortedMap
* Note: Not all operations support {@link Decision#REMOVE}.
- *
+ *
* @param entry the current entry
* @return the {@link Decision} based on the current entry
*/
diff --git a/src/main/java/org/apache/commons/collections4/TrieUtils.java b/src/main/java/org/apache/commons/collections4/TrieUtils.java
index a8a99741a..1e9b7dc75 100644
--- a/src/main/java/org/apache/commons/collections4/TrieUtils.java
+++ b/src/main/java/org/apache/commons/collections4/TrieUtils.java
@@ -21,7 +21,7 @@ import org.apache.commons.collections4.trie.UnmodifiableTrie;
/**
* A collection of {@link Trie} utilities.
- *
+ *
* @since 4.0
* @version $Id$
*/
@@ -31,19 +31,19 @@ public class TrieUtils {
* {@link TrieUtils} should not normally be instantiated.
*/
private TrieUtils() {}
-
+
/**
* Returns a synchronized instance of a {@link Trie}
- *
+ *
* @see java.util.Collections#synchronizedMap(java.util.Map)
*/
public static ArrayStack
is based on insertion
+ * The removal order of an 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.
@@ -44,7 +44,7 @@ import java.util.EmptyStackException;
@Deprecated
public class ArrayStackArrayStack
with an initial size.
- *
+ *
* @param initialSize the initial size to use
* @throws IllegalArgumentException if the specified initial size
* is negative
@@ -71,7 +71,7 @@ public class ArrayStackjava.util.Stack
.
* New users of this class should use isEmpty
instead.
- *
+ *
* @return true if the stack is currently empty
*/
public boolean empty() {
diff --git a/src/main/java/org/apache/commons/collections4/Bag.java b/src/main/java/org/apache/commons/collections4/Bag.java
index 11a7e4a65..8697df55b 100644
--- a/src/main/java/org/apache/commons/collections4/Bag.java
+++ b/src/main/java/org/apache/commons/collections4/Bag.java
@@ -28,7 +28,7 @@ import java.util.Set;
* Calling {@link #getCount(Object)} on a
would return 2, while
* calling {@link #uniqueSet()} would return {a, b, c}
.
* Collection
.
* The noncompliant methods are clearly marked with "(Violation)".
@@ -48,7 +48,7 @@ public interface Bagtrue
. Since it sometimes returns
* false
, this method violates the contract.
*
@@ -78,7 +78,7 @@ public interface BagnCopies
.
- *
+ *
* @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
@@ -105,7 +105,7 @@ public interface Bagtrue
if this call changed the collection
@@ -116,14 +116,14 @@ public interface Bagtrue
if the Bag contains all the collection
*/
@@ -156,7 +156,7 @@ public interface Bag(e==null ? 0 : e.hashCode()) ^ noOccurances)
.
// * This hash code definition is compatible with the Set interface.
-// *
+// *
// * @return the hash code of the Bag
// */
// int hashCode();
diff --git a/src/main/java/org/apache/commons/collections4/BagUtils.java b/src/main/java/org/apache/commons/collections4/BagUtils.java
index 8657e4e04..8a718aee0 100644
--- a/src/main/java/org/apache/commons/collections4/BagUtils.java
+++ b/src/main/java/org/apache/commons/collections4/BagUtils.java
@@ -59,7 +59,7 @@ public class BagUtils {
*
* Bag bag = BagUtils.synchronizedBag(new HashBag());
* ...
@@ -70,9 +70,9 @@ public class BagUtils {
* }
* }
*
- *
+ *
* Failure to follow this advice may result in non-deterministic behavior.
- *
+ *
* @param
* SortedBag bag = BagUtils.synchronizedSortedBag(new TreeBag());
* ...
@@ -153,9 +153,9 @@ public class BagUtils {
* }
* }
*
- *
+ *
* Failure to follow this advice may result in non-deterministic behavior.
- *
+ *
* @param put
method is not supported
- * @throws ClassCastException (optional) if the map limits the type of the
+ * @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
* in some way and the value was invalid
@@ -81,8 +81,8 @@ public interface BidiMapnull
if not found
- *
- * @throws ClassCastException (optional) if the map limits the type of the
+ *
+ * @throws ClassCastException (optional) if the map limits the type of the
* value and the specified value is inappropriate
* @throws NullPointerException (optional) if the map limits the values to
* non-null and null was specified
@@ -100,8 +100,8 @@ public interface BidiMapnull
if nothing removed
- *
- * @throws ClassCastException (optional) if the map limits the type of the
+ *
+ * @throws ClassCastException (optional) if the map limits the type of the
* value and the specified value is inappropriate
* @throws NullPointerException (optional) if the map limits the values to
* non-null and null was specified
diff --git a/src/main/java/org/apache/commons/collections4/BoundedCollection.java b/src/main/java/org/apache/commons/collections4/BoundedCollection.java
index 0853c7377..edfa820b1 100644
--- a/src/main/java/org/apache/commons/collections4/BoundedCollection.java
+++ b/src/main/java/org/apache/commons/collections4/BoundedCollection.java
@@ -21,7 +21,7 @@ import java.util.Collection;
/**
* Defines a collection that is bounded in size.
* Comparator
* objects.
* comparators
package. This class merely provides a
+ * Most of the functionality in this class can also be found in the
+ * comparators
package. This class merely provides a
* convenient central place if you have use for more than one class
* in the comparators
subpackage.
*
@@ -107,7 +107,7 @@ public class ComparatorUtils {
/**
* Gets a comparator that compares using a collection of {@link Comparator}s,
- * applied in (default iterator) sequence until one returns not equal or the
+ * applied in (default iterator) sequence until one returns not equal or the
* collection is exhausted.
*
* @param true
, sort
+ *
+ * @param trueFirst when true
, sort
* true
{@link Boolean}s before
* false
{@link Boolean}s.
* @return a comparator that sorts booleans
@@ -153,7 +153,7 @@ public class ComparatorUtils {
public static Comparatornull
values.
* constant
factory.
@@ -95,7 +95,7 @@ public class FactoryUtils {
*
*
* @see org.apache.commons.collections4.functors.PrototypeFactory
- *
+ *
* @param
prototype
factory, or a {@link ConstantFactory#NULL_INSTANCE} if
@@ -111,7 +111,7 @@ public class FactoryUtils {
* a no-args constructor.
*
* @see org.apache.commons.collections4.functors.InstantiateFactory
- *
+ *
* @param reflection
factory
@@ -126,7 +126,7 @@ public class FactoryUtils {
* the arguments specified to this method.
*
* @see org.apache.commons.collections4.functors.InstantiateFactory
- *
+ *
* @param MultiMap
is a Map with slightly different semantics.
@@ -53,7 +53,7 @@ public interface MultiMapnull
from a subsequent get(Object)
, however
* they may choose to return an empty collection.
- *
+ *
* @param key the key to remove from
* @param item the item to remove
* @return the value removed (which was passed in), null if nothing removed
diff --git a/src/main/java/org/apache/commons/collections4/OrderedMap.java b/src/main/java/org/apache/commons/collections4/OrderedMap.java
index f73a35eec..47a18b295 100644
--- a/src/main/java/org/apache/commons/collections4/OrderedMap.java
+++ b/src/main/java/org/apache/commons/collections4/OrderedMap.java
@@ -33,7 +33,7 @@ public interface OrderedMapnull
,
* or the argument itself otherwise.
- *
+ *
* @param null
* @return an empty set if the argument is null
@@ -83,7 +83,7 @@ public class SetUtils {
public static equals()
contract
* in {@link java.util.Set#equals(java.lang.Object)}.
@@ -99,14 +99,14 @@ public class SetUtils {
* the second. This ensures that the equals method works
* properly across different implementations of the Set
* interface.Set
when you cannot
* extend AbstractSet. The method takes Collection instances to enable other
* collection types to use the Set implementation algorithm.
- *
+ *
* @param
* Set s = SetUtils.synchronizedSet(mySet);
* synchronized (s) {
@@ -166,9 +166,9 @@ public class SetUtils {
* }
* }
*
- *
+ *
* This method is just a wrapper for {@link Collections#synchronizedSet(Set)}.
- *
+ *
* @param
* Set s = SetUtils.synchronizedSet(mySet);
* synchronized (s) {
@@ -262,9 +262,9 @@ public class SetUtils {
* }
* }
*
- *
+ *
* This method is just a wrapper for {@link Collections#synchronizedSortedSet(SortedSet)}.
- *
+ *
* @param TransformerUtils
provides reference implementations and
+ * TransformerUtils
provides reference implementations and
* utilities for the Transformer functor interface. The supplied transformers are:
*
*
- *
+ *
* @param
TransformerUtils.invokerTransformer("getName");
- * will call the getName/code> method on the input object to
+ * will call the
getName/code> method on the input object to
* determine the transformer result.
- *
+ *
* @param the input type
* @param
java.lang.String
* representation of the input object. This is achieved via the
* toString
method, null
returns 'null'.
- *
+ *
* @param
*
- *
- * If the {@link Trie} contained 'H' and 'L', a lookup of 'D' would
- * return 'L', because the XOR distance between D & L is smaller
- * than the XOR distance between D & H.
- *
+ *
+ * If the {@link Trie} contained 'H' and 'L', a lookup of 'D' would
+ * return 'L', because the XOR distance between D & L is smaller
+ * than the XOR distance between D & H.
+ *
* @param key the key to use in the search
* @return the key that is closest in a bitwise XOR metric to the provided key
*/
public K selectKey(K key);
-
+
/**
- * Returns the value whose key is closest in a bitwise XOR metric to
+ * Returns the value whose key is closest in a bitwise XOR metric to
* the provided key. This is NOT lexicographic closeness!
- *
+ *
* For example, given the keys:
- *
+ *
*
*
- *
- * If the {@link Trie} contained 'H' and 'L', a lookup of 'D' would
- * return 'L', because the XOR distance between D & L is smaller
- * than the XOR distance between D & H.
- *
+ *
+ * If the {@link Trie} contained 'H' and 'L', a lookup of 'D' would
+ * return 'L', because the XOR distance between D & L is smaller
+ * than the XOR distance between D & H.
+ *
* @param key the key to use in the search
* @return the value whose key is closest in a bitwise XOR metric
* to the provided key
*/
public V selectValue(K key);
-
+
/**
* Iterates through the {@link Trie}, starting with the entry whose bitwise
* value is closest in an XOR metric to the given key. After the closest
@@ -106,79 +106,79 @@ public interface Trie