default boolean isAncestor(final Tree<?, ?> node) {
		requireNonNull(node);

		Optional<T> ancestor = Optional.of(self());
		boolean result;
		do {
			result = ancestor.filter(a -> a.identical(node)).isPresent();
		} while (!result &&
				(ancestor = ancestor.flatMap(Tree::parent)).isPresent());

		return result;
	}
Return {@code true} if the given {@code node} is an ancestor of
{@code this} node. This operation is at worst {@code O(h)} where {@code h}
is the distance from the root to {@code this} node.

@param node the node to test
@return {@code true} if the given {@code node} is an ancestor of
        {@code this} node, {@code false} otherwise
@throws NullPointerException if the given {@code node} is {@code null}
jenetics.ext/src/main/java/io/jenetics/ext/util/Tree.java