Class DefaultGraphFactory

  • All Implemented Interfaces:
    GraphFactory

    public class DefaultGraphFactory
    extends Object
    implements GraphFactory

    Default Graph Factory

    Since:
    1.0
    Author:
    Andreas Pointner
    • Constructor Detail

      • DefaultGraphFactory

        public DefaultGraphFactory()
    • Method Detail

      • createGraphState

        public <V,​E> GraphState<V,​E> createGraphState()
        Description copied from interface: GraphFactory
        Returns a new instance of a graph state
        Specified by:
        createGraphState in interface GraphFactory
        Type Parameters:
        V - the type of the decorated vertex value
        E - the type of the decorated edge value
        Returns:
        a new graph state instance
      • createGraph

        public <T,​E> Graph<T,​E> createGraph​(GraphStateAccessor<T,​E> graphStateAccessor)
        Description copied from interface: GraphFactory
        Returns a new instance of a graph
        Specified by:
        createGraph in interface GraphFactory
        Type Parameters:
        T - the type of the decorated vertex value
        E - the type of the decorated edge value
        Parameters:
        graphStateAccessor - the internal data state representation of the graph
        Returns:
        the created graph
      • createVertex

        public <T,​E> Vertex<T,​E> createVertex​(T elem)
        Description copied from interface: GraphFactory
        Returns a new instance of a vertex with elem as decorated value
        Specified by:
        createVertex in interface GraphFactory
        Type Parameters:
        T - the type of the decorated vertex value
        E - the type of the decorated edge value
        Parameters:
        elem - the value to be decorated by the vertex
        Returns:
        the created vertex
      • createVertexView

        public <V,​E> VertexView<V,​E> createVertexView​(Vertex<V,​E> viewedVertex)
        Description copied from interface: GraphFactory
        Returns a new instance of a Vertex view
        Specified by:
        createVertexView in interface GraphFactory
        Type Parameters:
        V - the type of the decorated vertex value
        E - the type of the decorated edge value
        Parameters:
        viewedVertex - the vertex onto which the view should be created
        Returns:
        the created vertex view
      • createEdgeView

        public <V,​E> EdgeView<V,​E> createEdgeView​(Edge<V,​E> viewedEdge)
        Description copied from interface: GraphFactory
        Returns a new instance of an edge view
        Specified by:
        createEdgeView in interface GraphFactory
        Type Parameters:
        V - the type of the decorated vertex value
        E - the type of the decorated edge value
        Parameters:
        viewedEdge - the edge onto which the view should be created
        Returns:
        the created edge view
      • createEdge

        public <T,​E> Edge<T,​E> createEdge​(E elem)
        Description copied from interface: GraphFactory
        Returns a new instance of an edge
        Specified by:
        createEdge in interface GraphFactory
        Type Parameters:
        T - the type of the decorated vertex value
        E - the type of the decorated edge value
        Parameters:
        elem - the decorated element
        Returns:
        the created edge
      • createMetaTag

        public <T> MetaTag<T> createMetaTag()
        Description copied from interface: GraphFactory
        Returns a new instance of a meta tag
        Specified by:
        createMetaTag in interface GraphFactory
        Type Parameters:
        T - the type of the meta tag value
        Returns:
        the created meta tag
      • createMetaTag

        public <T> MetaTag<T> createMetaTag​(String key,
                                            T value)
        Description copied from interface: GraphFactory
        Returns a new instance of a meta tag with key and value set
        Specified by:
        createMetaTag in interface GraphFactory
        Type Parameters:
        T - the type of the value
        Parameters:
        key - the key value
        value - the value
        Returns:
        the resulting meta tag