
![image](https://user-images.githubusercontent.com/12162539/50417924-d6cc2b80-0863-11e9-860f-bf9d132db570.png)

* @return true / false
         */
        boolean isRoot() {
            return null == parent;
        }
        /**
         * if the current node the leaf node
         *
         * @return true / false
         */
        boolean isLeaf() {
            return children.isEmpty();
        }
        Node markBegin() {
            beginTimestamp = currentTimeMillis();
            return this;
        }
        Node markEnd() {
            endTimestamp = currentTimeMillis();
            return this;
        }
    }
    /**
     * callback interface for recursive visit
     */
    private interface Callback {
        void callback(int deep, boolean isLast, String prefix, Node node);
    }
}