Class Graphs.SynchronizedTree<V,​E>

    • Constructor Detail

      • SynchronizedTree

        public SynchronizedTree​(Tree<V,​E> delegate)
        Creates a new instance based on the provided delegate.
        Parameters:
        delegate -
    • Method Detail

      • getDepth

        public int getDepth​(V vertex)
        Description copied from interface: Tree
        Returns the (unweighted) distance of vertex from the root of this tree.
        Specified by:
        getDepth in interface Tree<V,​E>
        Parameters:
        vertex - the vertex whose depth is to be returned.
        Returns:
        the length of the shortest unweighted path from vertex to the root of this tree
        See Also:
        Tree.getHeight()
      • getHeight

        public int getHeight()
        Description copied from interface: Tree
        Returns the maximum depth in this tree.
        Specified by:
        getHeight in interface Tree<V,​E>
        Returns:
        the maximum depth in this tree
        See Also:
        Tree.getDepth(Object)
      • getRoot

        public V getRoot()
        Description copied from interface: Tree
        Returns the root of this tree. The root is defined to be the vertex (designated either at the tree's creation time, or as the first vertex to be added) with respect to which vertex depth is measured.
        Specified by:
        getRoot in interface Tree<V,​E>
        Returns:
        the root of this tree