static boolean equals(final Tree<?, ?> a, final Tree<?, ?> b) {
		boolean equals = a == b;
		if (!equals && a != null && b != null) {
			equals = a.childCount() == b.childCount();
			if (equals) {
				equals = Objects.equals(a.value(), b.value());
				if (equals && a.childCount() > 0) {
					equals = equals(a.childIterator(), b.childIterator());
				}
			}
		}

		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