Package science.aist.gtf.graph.factory
Class DefaultGraphFactory
- java.lang.Object
-
- science.aist.gtf.graph.factory.DefaultGraphFactory
-
- All Implemented Interfaces:
GraphFactory
public class DefaultGraphFactory extends Object implements GraphFactory
Default Graph Factory
- Since:
- 1.0
- Author:
- Andreas Pointner
-
-
Constructor Summary
Constructors Constructor Description DefaultGraphFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T,E>
Edge<T,E>createEdge(E elem)
Returns a new instance of an edge<V,E>
EdgeView<V,E>createEdgeView(Edge<V,E> viewedEdge)
Returns a new instance of an edge view<T,E>
Graph<T,E>createGraph(GraphStateAccessor<T,E> graphStateAccessor)
Returns a new instance of a graph<V,E>
GraphState<V,E>createGraphState()
Returns a new instance of a graph state<T> MetaTag<T>
createMetaTag()
Returns a new instance of a meta tag<T> MetaTag<T>
createMetaTag(String key, T value)
Returns a new instance of a meta tag with key and value set<T,E>
Vertex<T,E>createVertex(T elem)
Returns a new instance of a vertex with elem as decorated value<V,E>
VertexView<V,E>createVertexView(Vertex<V,E> viewedVertex)
Returns a new instance of a Vertex view
-
-
-
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 interfaceGraphFactory
- Type Parameters:
V
- the type of the decorated vertex valueE
- 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 interfaceGraphFactory
- Type Parameters:
T
- the type of the decorated vertex valueE
- 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 interfaceGraphFactory
- Type Parameters:
T
- the type of the decorated vertex valueE
- 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 interfaceGraphFactory
- Type Parameters:
V
- the type of the decorated vertex valueE
- 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 interfaceGraphFactory
- Type Parameters:
V
- the type of the decorated vertex valueE
- 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 interfaceGraphFactory
- Type Parameters:
T
- the type of the decorated vertex valueE
- 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 interfaceGraphFactory
- 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 interfaceGraphFactory
- Type Parameters:
T
- the type of the value- Parameters:
key
- the key valuevalue
- the value- Returns:
- the resulting meta tag
-
-