public static <V> List<V> inOrderList(final ValueBinaryTreeNode<? extends V> root) {
        final List<V> result = new LinkedList<V>();
        final LinkedList<ValueBinaryTreeNode<? extends V>> nodesToCompile = new LinkedList<>();
        final Set<ValueBinaryTreeNode<? extends V>> nodesCompiled = new HashSet<>();
        addToList(nodesToCompile, root);
        while (!nodesToCompile.isEmpty()) {
            final ValueBinaryTreeNode<? extends V> node = nodesToCompile.removeFirst();
            if (node.getLeft() != null && !nodesCompiled.contains(node)) {
                addToList(nodesToCompile, node);
                addToList(nodesToCompile, node.getLeft());
                nodesCompiled.add(node);
            } else {
                result.add(node.getValue());
                addToList(nodesToCompile, node.getRight());
            }
        }
        return result;
    }