private static boolean areElementsEqual()

in intellij-plugin-structure/structure-intellij/src/main/java/com/jetbrains/plugin/structure/intellij/utils/JDOMUtil.java [42:52]


  private static boolean areElementsEqual(Element e1, Element e2) {
    if (e1 == null && e2 == null) return true;
    //noinspection SimplifiableIfStatement
    if (e1 == null || e2 == null) return false;

    List<Content> e1Content = e1.getContent(CONTENT_FILTER);
    List<Content> e2Content = e2.getContent(CONTENT_FILTER);
    return Objects.equals(e1.getName(), e2.getName())
        && attListsEqual(e1.getAttributes(), e2.getAttributes())
        && contentListsEqual(e1Content, e2Content);
  }