public synchronized boolean equals(Object obj)
{
if (obj == null)
return false;
Topic that = (Topic)obj;
if (!getName().equals(that.getName()))
return false;
String thisNS = getTopicNamespace().getTargetNamespace();
String thatNS = that.getTopicNamespace().getTargetNamespace();
if (!thisNS.equals(thatNS))
return false;
if (!getConcretePath().equals(that.getConcretePath()))
return false;
if (isFinal() != that.isFinal())
return false;
String thisPattern = getMessagePattern();
String thatPattern = that.getMessagePattern();
if (thisPattern != null)
return thisPattern.equals(thatPattern);
return thatPattern == null;