DelegateForest (probably DelegateTree as well)
Not all addEdge-methods in DelegateForest inherited from GraphDecorator are using the DelegateForest addEdge-method which enforcing the forest structure.
This makes it possible to create a DelegateForest which is not a forest.
Use a DelegateForest and build a forest structure, and use a addEdge-method from GraphDecorator that is not overwritten by DelegateForest and try to add a forbidden edge. Using JUNG 2.0.1.
Override the two other addEdge()-methods and call addEdge(E, V, V, EdgeType) which enforcing forest structure.
Log in to post a comment.