Thrown on an attempt to add a named object to a collection that requires unique names, and finding that there already is an object by that name in the collection. Constructors are provided that take 1 or 2 Nameable references plus an arbitrary String. The constructors are robust in that null references are ignored. The preferred constructors are those that take two named objects (the container and the would-be containee), or two named objects and an arbitrary string (which can be used to provide additional information about the error).
This class has no constructors that take a Throwable cause because no such constructors have been needed, but in principle, such constructors could be added if needed.
@author John S. Davis II, Edward A. Lee, Christopher Hylands
@version $Id: NameDuplicationException.java,v 1.52 2005/07/08 19:59:18 cxh Exp $
@since Ptolemy II 0.2
@Pt.ProposedRating Green (cxh)
@Pt.AcceptedRating Green (cxh)