public Vertex < T > findVertexByData ( T data , Comparator < T > compare ) { Vertex < T > match = null ; for ( Vertex < T > v : verticies . values ( ) ) { if ( compare . compare ( data , v . getData ( ) ) == 0 ) { match = v ; break ; } } return match ; }
Search the verticies for one with data .