Package science.aist.gtf.graph.impl
Class GraphStateImpl<V,E>
- java.lang.Object
-
- science.aist.gtf.graph.impl.GraphStateImpl<V,E>
-
- Type Parameters:
V- the type of the decorated vertex valueE- the type of the decorated edge value
- All Implemented Interfaces:
GraphState<V,E>,GraphStateAccessor<V,E>
public class GraphStateImpl<V,E> extends Object implements GraphState<V,E>
Represents a current state of a graph
- Since:
- 1.0
- Author:
- Andreas Pointner
-
-
Constructor Summary
Constructors Constructor Description GraphStateImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEdge(Edge<V,E> edge, Vertex<V,E> source, Vertex<V,E> target)Adds an edge between given source and target vertexvoidaddVertex(Vertex<V,E> vertex)Adds a vertex to the graph stateSet<Edge<V,E>>getEdges(Vertex<V,E> vertex)returns the edges for a given vertexVertex<V,E>getSource(Edge<V,E> edge)Returns the source vertex for a given edgeVertex<V,E>getTarget(Edge<V,E> edge)Returns the target vertex for a given edgeCollection<Vertex<V,E>>getVertices()returns a snapshot collection of the vertices in the graph state-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface science.aist.gtf.graph.GraphState
readonly
-
-
-
-
Method Detail
-
getVertices
public Collection<Vertex<V,E>> getVertices()
Description copied from interface:GraphStateAccessorreturns a snapshot collection of the vertices in the graph state- Specified by:
getVerticesin interfaceGraphStateAccessor<V,E>- Returns:
- a snapshot collection of the vertices in the graph state
-
getEdges
public Set<Edge<V,E>> getEdges(Vertex<V,E> vertex)
Description copied from interface:GraphStateAccessorreturns the edges for a given vertex- Specified by:
getEdgesin interfaceGraphStateAccessor<V,E>- Parameters:
vertex- the vertex for which the edges should be retrieved- Returns:
- the set of edges for the given vertex
-
getSource
public Vertex<V,E> getSource(Edge<V,E> edge)
Description copied from interface:GraphStateAccessorReturns the source vertex for a given edge- Specified by:
getSourcein interfaceGraphStateAccessor<V,E>- Parameters:
edge- the edge for which the source vertex should be returned- Returns:
- the source vertex of the given
-
getTarget
public Vertex<V,E> getTarget(Edge<V,E> edge)
Description copied from interface:GraphStateAccessorReturns the target vertex for a given edge- Specified by:
getTargetin interfaceGraphStateAccessor<V,E>- Parameters:
edge- the edge for which the target vertex should be returned- Returns:
- the target vertex of the given
-
addVertex
public void addVertex(Vertex<V,E> vertex)
Description copied from interface:GraphStateAdds a vertex to the graph state- Specified by:
addVertexin interfaceGraphState<V,E>- Parameters:
vertex- the vertex to add
-
addEdge
public void addEdge(Edge<V,E> edge, Vertex<V,E> source, Vertex<V,E> target)
Description copied from interface:GraphStateAdds an edge between given source and target vertex- Specified by:
addEdgein interfaceGraphState<V,E>- Parameters:
edge- the edge to addsource- the source vertextarget- the target vertex
-
-