private static boolean equals(
		final Iterator<? extends Tree<?, ?>> a,
		final Iterator<? extends Tree<?, ?>> b
	) {
		boolean equals = true;
		while (a.hasNext() && equals) {
			equals = equals(a.next(), b.next());
		}

		return equals;
	}
Checks if the two given trees has the same structure with the same values.

@param a the first tree
@param b the second tree
@return {@code true} if the two given trees are structurally equals,
        {@code false} otherwise
jenetics.ext/src/main/java/io/jenetics/ext/util/Trees.java