private static boolean areElementContentsEqual(@NotNull Element e1, @NotNull Element e2, boolean ignoreEmptyAttrValues) {
    Iterator<Content> l1 = FilteringIterator.create(e1.getContent().iterator(), CONTENT_FILTER);
    Iterator<Content> l2 = FilteringIterator.create(e2.getContent().iterator(), CONTENT_FILTER);
    while (l1.hasNext() && l2.hasNext()) {
      if (!contentsEqual(l1.next(), l2.next(), ignoreEmptyAttrValues)) {
        return false;
      }
    }

    return l1.hasNext() == l2.hasNext();
  }
private static boolean areElementContentsEqual(@NotNull Element e1, @NotNull Element e2, boolean ignoreEmptyAttrValues)