public class GraphExamples {
void graphExample() throws Exception {
SimpleFeatureSource featureSource = null;
// graphExample start
final LineGraphGenerator generator = new BasicLineGraphGenerator();
SimpleFeatureCollection fc = featureSource.getFeatures();
fc.accepts(new FeatureVisitor() {
public void visit(Feature feature) {
generator.add(feature);
}
}, null);
Graph graph = generator.getGraph();
// graphExample end
// visitor example start
class OrphanVisitor implements GraphVisitor {
private int count = 0;