boolean (@NotNull Stream<Content> c1, @NotNull Stream<Content> c2, boolean ignoreEmptyAttrValues) { Iterator<Content> l1 = c1.iterator(); Iterator<Content> l2 = c2.iterator(); while (l1.hasNext() && l2.hasNext()) { if (!contentsEqual(l1.next(), l2.next(), ignoreEmptyAttrValues)) { return false; } } return l1.hasNext() == l2.hasNext(); }