KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > test > collections > UnorderedUncountedCollectionComparer


1 /**
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.test.collections;
5
6 import com.tc.util.EqualityComparator;
7 import com.tc.util.Stringifier;
8
9 import java.util.List JavaDoc;
10
11 /**
12  * An {@link UnorderedCollectionComparer}that further ignores whether the two collections have different numbers of
13  * instances of the same object, as long as both collections have at least one of that object. (In other words, [ 'A',
14  * 'A', 'B', 'C' ] compares equal to [ 'A', 'B', 'C', 'C' ], but not [ 'A', 'A', 'C' ].)
15  */

16 public class UnorderedUncountedCollectionComparer extends UnorderedCollectionComparer {
17
18   public UnorderedUncountedCollectionComparer(EqualityComparator comparator, Stringifier describer) {
19     super(comparator, describer);
20   }
21
22   protected void mismatchedNumbers(Object JavaDoc[] collectionOne, List JavaDoc mismatches, int i, int numberInOne, int numberInTwo) {
23     // Nothing to do here.
24
}
25   
26 }
Popular Tags