diff --git a/src/main/java/org/apache/commons/collections4/sequence/SequencesComparator.java b/src/main/java/org/apache/commons/collections4/sequence/SequencesComparator.java index 01dec78a6..7b40e6ffa 100644 --- a/src/main/java/org/apache/commons/collections4/sequence/SequencesComparator.java +++ b/src/main/java/org/apache/commons/collections4/sequence/SequencesComparator.java @@ -18,6 +18,9 @@ package org.apache.commons.collections4.sequence; import java.util.List; +import org.apache.commons.collections4.functors.DefaultEquator; +import org.apache.commons.collections4.functors.Equator; + /** * This class allows to compare two objects sequences. *
@@ -61,6 +64,9 @@ public class SequencesComparator
- * Creates a new instance of SequencesComparator.
+ * Creates a new instance of SequencesComparator using a {@link DefaultEquator}.
*
* It is guaranteed that the comparisons will always be done as
*
+ * Creates a new instance of SequencesComparator with a custom {@link Equator}.
+ *
+ * It is guaranteed that the comparisons will always be done as
+ * o1.equals(o2)
where o1
belongs to the first
@@ -76,14 +82,30 @@ public class SequencesComparatorequals
method is specialized.
*
- * @param sequence1
- * first sequence to be compared
- * @param sequence2
- * second sequence to be compared
+ * @param sequence1 first sequence to be compared
+ * @param sequence2 second sequence to be compared
*/
public SequencesComparator(final ListEquator.equate(o1, o2)
where o1
belongs to the first
+ * sequence and o2
belongs to the second sequence.
+ *
+ * @param sequence1 first sequence to be compared
+ * @param sequence2 second sequence to be compared
+ * @param equator the equator to use for testing object equality
+ */
+ public SequencesComparator(final List