static int hashCode(final Tree<?, ?> tree) {
		return tree != null
			? tree.breadthFirstStream()
				.mapToInt(node -> 31*Objects.hashCode(node.value()) + 37)
				.sum() + 17
			: 0;
	}
Calculates the hash code of the given tree.

@param tree the tree where the hash is calculated from
@return the hash code of the tree
@throws NullPointerException if the given {@code tree} is {@code null}
jenetics.ext/src/main/java/io/jenetics/ext/util/Tree.java