I have to create a graph with its self-defined node type and the nodes & connections are read from a txt file one by one.
The file format is like this: startNode attibutes endNode.
Every time I read one line, I created 2 node objects: startNode & endNode. and add edge between them..
However, the startNode may exist in several lines..
e.g. V1 ... V2 ; V1 ... V3
Therefore, I have to check whether my graph has contained the node before I add edges..and I should use the vertex in graphs instead of the node newly created..
Does jung have any built-in method to solve this problem? Or any suggestions?