01: // This file is part of KeY - Integrated Deductive Software Design
02: // Copyright (C) 2001-2007 Universitaet Karlsruhe, Germany
03: // Universitaet Koblenz-Landau, Germany
04: // Chalmers University of Technology, Sweden
05: //
06: // The KeY system is protected by the GNU General Public License.
07: // See LICENSE.TXT for details.
08: //
09: //
10: package de.uka.ilkd.key.collection;
11:
12: /** thrown if a duplicate is being added via addUnique() */
13: public class NotUniqueException extends Exception {
14: Object offender;
15:
16: public NotUniqueException(Object o) {
17: offender = o;
18: }
19:
20: public String toString() {
21: return "Tried to add a duplicate object to set. Offender is \n"
22: + offender + "\nof class " + offender.getClass();
23: }
24: }
|