Package edu.uci.ics.jung.graph.util
Class Graphs.SynchronizedTree<V,E>
- java.lang.Object
-
- edu.uci.ics.jung.graph.util.Graphs.SynchronizedAbstractGraph<V,E>
-
- edu.uci.ics.jung.graph.util.Graphs.SynchronizedDirectedGraph<V,E>
-
- edu.uci.ics.jung.graph.util.Graphs.SynchronizedForest<V,E>
-
- edu.uci.ics.jung.graph.util.Graphs.SynchronizedTree<V,E>
-
- All Implemented Interfaces:
DirectedGraph<V,E>,Forest<V,E>,Graph<V,E>,Hypergraph<V,E>,Tree<V,E>,java.io.Serializable
- Enclosing class:
- Graphs
static class Graphs.SynchronizedTree<V,E> extends Graphs.SynchronizedForest<V,E> implements Tree<V,E>
-
-
Field Summary
-
Fields inherited from class edu.uci.ics.jung.graph.util.Graphs.SynchronizedAbstractGraph
delegate
-
-
Constructor Summary
Constructors Constructor Description SynchronizedTree(Tree<V,E> delegate)Creates a new instance based on the provideddelegate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDepth(V vertex)Returns the (unweighted) distance ofvertexfrom the root of this tree.intgetHeight()Returns the maximum depth in this tree.VgetRoot()Returns the root of this tree.-
Methods inherited from class edu.uci.ics.jung.graph.util.Graphs.SynchronizedForest
getChildCount, getChildEdges, getChildren, getParent, getParentEdge, getTrees
-
Methods inherited from class edu.uci.ics.jung.graph.util.Graphs.SynchronizedDirectedGraph
getDest, getSource, isDest, isSource
-
Methods inherited from class edu.uci.ics.jung.graph.util.Graphs.SynchronizedAbstractGraph
addEdge, addEdge, addEdge, addEdge, addVertex, containsEdge, containsVertex, degree, findEdge, findEdgeSet, getDefaultEdgeType, getEdgeCount, getEdgeCount, getEdges, getEdges, getEdgeType, getEndpoints, getIncidentCount, getIncidentEdges, getIncidentVertices, getInEdges, getNeighborCount, getNeighbors, getOpposite, getOutEdges, getPredecessorCount, getPredecessors, getSuccessorCount, getSuccessors, getVertexCount, getVertices, inDegree, isIncident, isNeighbor, isPredecessor, isSuccessor, outDegree, removeEdge, removeVertex
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface edu.uci.ics.jung.graph.Forest
getChildCount, getChildEdges, getChildren, getParent, getParentEdge, getTrees
-
Methods inherited from interface edu.uci.ics.jung.graph.Graph
addEdge, addEdge, getDest, getEndpoints, getInEdges, getOpposite, getOutEdges, getPredecessorCount, getPredecessors, getSource, getSuccessorCount, getSuccessors, inDegree, isDest, isPredecessor, isSource, isSuccessor, outDegree
-
Methods inherited from interface edu.uci.ics.jung.graph.Hypergraph
addEdge, addEdge, addVertex, containsEdge, containsVertex, degree, findEdge, findEdgeSet, getDefaultEdgeType, getEdgeCount, getEdgeCount, getEdges, getEdges, getEdgeType, getIncidentCount, getIncidentEdges, getIncidentVertices, getNeighborCount, getNeighbors, getVertexCount, getVertices, isIncident, isNeighbor, removeEdge, removeVertex
-
-
-
-
Method Detail
-
getDepth
public int getDepth(V vertex)
Description copied from interface:TreeReturns the (unweighted) distance ofvertexfrom the root of this tree.- Specified by:
getDepthin interfaceTree<V,E>- Parameters:
vertex- the vertex whose depth is to be returned.- Returns:
- the length of the shortest unweighted path
from
vertexto the root of this tree - See Also:
Tree.getHeight()
-
getHeight
public int getHeight()
Description copied from interface:TreeReturns the maximum depth in this tree.- Specified by:
getHeightin interfaceTree<V,E>- Returns:
- the maximum depth in this tree
- See Also:
Tree.getDepth(Object)
-
-