public static int hashCode(@Nullable Element e, boolean ignoreEmptyAttrValues) {
    if (e == null) {
      return 0;
    }

    int hashCode = e.getName().hashCode();
    for (Attribute attribute : getAttributes(e)) {
      String value = attribute.getValue();
      if (!ignoreEmptyAttrValues || (value != null && !value.isEmpty())) {
        hashCode = hashCode * 31 * 31 + attribute.getName().hashCode() * 31 + value.hashCode();
      }
    }

    for (Content content : e.getContent()) {
      if (!CONTENT_FILTER.test(content)) {
        continue;
      }

      int contentHash = content instanceof Element ? hashCode((Element)content, ignoreEmptyAttrValues) : e.getValue().hashCode();
      hashCode = hashCode * 31 + contentHash;
    }
    return hashCode;
  }
public static int hashCode(@Nullable Element e, boolean ignoreEmptyAttrValues)