edu.uci.ics.jung.utils
Class TypedVertexGenerator

java.lang.Object
  extended byedu.uci.ics.jung.utils.TypedVertexGenerator
All Implemented Interfaces:
VertexGenerator

public class TypedVertexGenerator
extends java.lang.Object
implements VertexGenerator

Generates vertices according to the edge requirements submitted to the constructor. This implementation respects edge direction (directed, undirected, mixed) as well as edge multiplicity (parallel edges). See the constructor for a list of the vertex types.

Author:
Joshua O'Madadhain

Constructor Summary
TypedVertexGenerator(java.util.Collection edge_requirements)
          Determines the type of vertices that this generator will create, according to the edge requirements specified in the constructor:
  • undirected, no parallel edges - creates @link{SimpleUndirectedSparseVertex}
  • directed, no parallel edges - creates @link{SimpleDirectedSparseVertex}
  • mixed (directed and undirected), no parallel edges - creates @link{SimpleSparseVertex}
  • undirected, parallel edges allowed - creates @link{UndirectedSparseVertex}
  • directed, parallel edges allowed - creates @link{DirectedSparseVertex}
  • mixed, parallel edges allowed - creates @link{SparseVertex}
  •  
    Method Summary
     Vertex create()
              Creates a vertex whose type is determined by the requirements specified in the constructor.
     
    Methods inherited from class java.lang.Object
    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    TypedVertexGenerator

    public TypedVertexGenerator(java.util.Collection edge_requirements)
    Determines the type of vertices that this generator will create, according to the edge requirements specified in the constructor:
    1. undirected, no parallel edges - creates @link{SimpleUndirectedSparseVertex}
    2. directed, no parallel edges - creates @link{SimpleDirectedSparseVertex}
    3. mixed (directed and undirected), no parallel edges - creates @link{SimpleSparseVertex}
    4. undirected, parallel edges allowed - creates @link{UndirectedSparseVertex}
    5. directed, parallel edges allowed - creates @link{DirectedSparseVertex}
    6. mixed, parallel edges allowed - creates @link{SparseVertex}

    Method Detail

    create

    public Vertex create()
    Creates a vertex whose type is determined by the requirements specified in the constructor.

    Specified by:
    create in interface VertexGenerator
    See Also:
    VertexGenerator.create()