KickJava   Java API By Example, From Geeks To Geeks.

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


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.Stringifier;
7
8 /**
9  * A {@link CollectionMismatch}that is used when one collection is missing an object that's present in the other
10  * collection.
11  */

12 class MissingObjectCollectionMismatch extends CollectionMismatch {
13   public MissingObjectCollectionMismatch(Object JavaDoc originating, boolean originatingIsInCollectionOne,
14                                          int originatingIndex, Stringifier describer) {
15     super(originating, null, originatingIsInCollectionOne, originatingIndex, -1, describer);
16   }
17
18   public String JavaDoc toString() {
19     return "Missing object: there is no counterpart in " + comparedAgainstCollection() + " for " + originatingString();
20   }
21 }
Popular Tags