Package repast.simphony.xml
Class DelegatingEdgeCreator
- java.lang.Object
-
- repast.simphony.xml.DelegatingEdgeCreator
-
- All Implemented Interfaces:
EdgeCreator
public class DelegatingEdgeCreator extends Object implements EdgeCreator
Edge creator that delegates the actual edge creation to a specified delegate.- Author:
- Nick Collier
-
-
Constructor Summary
Constructors Constructor Description DelegatingEdgeCreator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RepastEdge<?>
createEdge(Object source, Object target, boolean isDirected, double weight)
Creates an Edge with the specified source, target, direction and weight.Class<?>
getEdgeType()
Gets the edge type produced by this EdgeCreator.void
initDelegate(EdgeCreator delegate)
Sets the delegate to the specified EdgeCreator.
-
-
-
Method Detail
-
initDelegate
public void initDelegate(EdgeCreator delegate)
Sets the delegate to the specified EdgeCreator.- Parameters:
delegate
-
-
getEdgeType
public Class<?> getEdgeType()
Description copied from interface:EdgeCreator
Gets the edge type produced by this EdgeCreator.- Specified by:
getEdgeType
in interfaceEdgeCreator
- Returns:
- the edge type produced by this EdgeCreator.
-
createEdge
public RepastEdge<?> createEdge(Object source, Object target, boolean isDirected, double weight)
Description copied from interface:EdgeCreator
Creates an Edge with the specified source, target, direction and weight.- Specified by:
createEdge
in interfaceEdgeCreator
- Parameters:
source
- the edge sourcetarget
- the edge targetisDirected
- whether or not the edge is directedweight
- the weight of the edge- Returns:
- the created edge.
-
-