01: /**
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */package com.tc.test.collections;
04:
05: import com.tc.util.EqualityComparator;
06: import com.tc.util.Stringifier;
07:
08: import java.util.List;
09:
10: /**
11: * An {@link UnorderedCollectionComparer}that further ignores whether the two collections have different numbers of
12: * instances of the same object, as long as both collections have at least one of that object. (In other words, [ 'A',
13: * 'A', 'B', 'C' ] compares equal to [ 'A', 'B', 'C', 'C' ], but not [ 'A', 'A', 'C' ].)
14: */
15: public class UnorderedUncountedCollectionComparer extends
16: UnorderedCollectionComparer {
17:
18: public UnorderedUncountedCollectionComparer(
19: EqualityComparator comparator, Stringifier describer) {
20: super (comparator, describer);
21: }
22:
23: protected void mismatchedNumbers(Object[] collectionOne,
24: List mismatches, int i, int numberInOne, int numberInTwo) {
25: // Nothing to do here.
26: }
27:
28: }
|