Class ClassBasedEdgeFactory<V,​E>

  • Type Parameters:
    V - the graph vertex type
    E - the graph edge type
    All Implemented Interfaces:
    java.io.Serializable, EdgeFactory<V,​E>

    public class ClassBasedEdgeFactory<V,​E>
    extends java.lang.Object
    implements EdgeFactory<V,​E>, java.io.Serializable
    An EdgeFactory for producing edges by using a class as a factory.
    Since:
    Jul 14, 2003
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Class<? extends E> edgeClass  
      private static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Constructor Description
      ClassBasedEdgeFactory​(java.lang.Class<? extends E> edgeClass)
      Create a new class based edge factory.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      E createEdge​(V source, V target)
      Creates a new edge whose endpoints are the specified source and target vertices.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • edgeClass

        private final java.lang.Class<? extends E> edgeClass
    • Constructor Detail

      • ClassBasedEdgeFactory

        public ClassBasedEdgeFactory​(java.lang.Class<? extends E> edgeClass)
        Create a new class based edge factory.
        Parameters:
        edgeClass - the edge class
    • Method Detail

      • createEdge

        public E createEdge​(V source,
                            V target)
        Description copied from interface: EdgeFactory
        Creates a new edge whose endpoints are the specified source and target vertices.
        Specified by:
        createEdge in interface EdgeFactory<V,​E>
        Parameters:
        source - the source vertex.
        target - the target vertex.
        Returns:
        a new edge whose endpoints are the specified source and target vertices.
        See Also:
        EdgeFactory.createEdge(Object, Object)