@@ -596,13 +596,17 @@ public class MacroDef extends AntlibDefinition {
}
}
/**
/**
* equality method for macrodef, ignores project and
* similar equality method for macrodef, ignores project and
* runtime info.
* runtime info.
*
*
* @param obj an <code>Object</code> value
* @param obj an <code>Object</code> value
* @return a <code>boolean</code> value
* @return a <code>boolean</code> value
*/
*/
public boolean equals(Object obj) {
public boolean similar(Object obj) {
if (obj == this) {
return true;
}
if (obj == null) {
if (obj == null) {
return false;
return false;
}
}
@@ -649,17 +653,6 @@ public class MacroDef extends AntlibDefinition {
return true;
return true;
}
}
/**
* @return a hash code value for this object.
*/
public int hashCode() {
return objectHashCode(name)
+ objectHashCode(getURI())
+ objectHashCode(nestedSequential)
+ objectHashCode(attributes)
+ objectHashCode(elements);
}
/**
/**
* extends AntTypeDefinition, on create
* extends AntTypeDefinition, on create
* of the object, the template macro definition
* of the object, the template macro definition
@@ -704,7 +697,7 @@ public class MacroDef extends AntlibDefinition {
return false;
return false;
}
}
MyAntTypeDefinition otherDef = (MyAntTypeDefinition) other;
MyAntTypeDefinition otherDef = (MyAntTypeDefinition) other;
return macroDef.equals (otherDef.macroDef);
return macroDef.similar (otherDef.macroDef);
}
}
/**
/**
@@ -720,7 +713,7 @@ public class MacroDef extends AntlibDefinition {
return false;
return false;
}
}
MyAntTypeDefinition otherDef = (MyAntTypeDefinition) other;
MyAntTypeDefinition otherDef = (MyAntTypeDefinition) other;
return macroDef.equals (otherDef.macroDef);
return macroDef.similar (otherDef.macroDef);
}
}
}
}