All Downloads are FREE. Search and download functionalities are using the official Maven repository.

salvo.jesus.graph.TreeImplFactory Maven / Gradle / Ivy

Go to download

This is a modified version of the OpenJGraph library (https://sourceforge.net/projects/openjgraph/), used in the JInsect library.

The newest version!
package salvo.jesus.graph;

/**
 * The factory for creating Vertices and Edges in a GraphImpl class.
 *
 * @author  Jesus M. Salvo jr.
 */

public class TreeImplFactory implements GraphFactory {

    public TreeImplFactory() {}

    public Vertex createVertex() {
        return new VertexImpl( "New Vertex" );
    }

    public Edge createEdge( Vertex v1, Vertex v2 ) {
        return new EdgeImpl( v1, v2 );
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy