/** Determines if this EmptyElement has the same attributes as another. * @param ee another EmptyElement * @return true if it has the same attributes */ public bool hasSameAttributes(EmptyElement ee) { if (ee == null) { return(false); } bool same = countAttributes() == ee.countAttributes(); if (same && m_attributes != null) { // count is the same, so if extra, one will not be equal foreach (Attribute a in m_attributes) { Attribute a2 = ee.findAttribute(a.name); if (!a.equals(a2)) { return(false); } } } return(same); }
/** Determines if this EmptyElement has the same attributes as another. * @param ee another EmptyElement * @return true if it has the same attributes */ public bool hasSameAttributes(EmptyElement ee) { if (ee == null) return false; bool same = countAttributes() == ee.countAttributes(); if (same && m_attributes != null) { // count is the same, so if extra, one will not be equal foreach (Attribute a in m_attributes) { Attribute a2 = ee.findAttribute(a.name); if (!a.equals(a2)) return false; } } return same; }