Package repast.simphony.space.graph
Class DefaultEdgeCreator<T>
- java.lang.Object
-
- repast.simphony.space.graph.DefaultEdgeCreator<T>
-
- All Implemented Interfaces:
EdgeCreator<RepastEdge<T>,T>
public class DefaultEdgeCreator<T> extends Object implements EdgeCreator<RepastEdge<T>,T>
Default implementation of EdgeCreator that return RepastEdge.- Author:
- Nick Collier
-
-
Constructor Summary
Constructors Constructor Description DefaultEdgeCreator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RepastEdge<T>
createEdge(T source, T target, boolean isDirected, double weight)
Creates an Edge with the specified source, target, direction and weight.Class<RepastEdge>
getEdgeType()
Gets the edge type produced by this EdgeCreator.
-
-
-
Method Detail
-
createEdge
public RepastEdge<T> createEdge(T source, T target, boolean isDirected, double weight)
Creates an Edge with the specified source, target, direction and weight.- Specified by:
createEdge
in interfaceEdgeCreator<RepastEdge<T>,T>
- Parameters:
source
- the edge sourcetarget
- the edge targetisDirected
- whether or not the edge is directedweight
- the weight of the edge- Returns:
- the created edge.
-
getEdgeType
public Class<RepastEdge> getEdgeType()
Gets the edge type produced by this EdgeCreator.- Specified by:
getEdgeType
in interfaceEdgeCreator<RepastEdge<T>,T>
- Returns:
- the edge type produced by this EdgeCreator.
-
-