public void display() { System.out.println("******************************************"); System.out.println("Vertices "); for (VertexIter vxiter = getVertices(); vxiter.hasNext(); ) { vxiter.next().display(); } System.out.println("******************************************"); }
// Finds a vertex given its name in the vertices list public Vertex findsVertex(String theName) { Vertex theVertex = null; // if we are dealing with the root if (theName == null) { return null; } for (VertexIter vxiter = getVertices(); vxiter.hasNext(); ) { theVertex = vxiter.next(); if (theName.equals(theVertex.getName())) { return theVertex; } } return theVertex; }