Package repast.simphony.xml
Class DelegatingEdgeCreator
java.lang.Object
repast.simphony.xml.DelegatingEdgeCreator
- All Implemented Interfaces:
EdgeCreator
Edge creator that delegates the actual edge creation to
a specified delegate.
- Author:
- Nick Collier
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionRepastEdge<?>
createEdge
(Object source, Object target, boolean isDirected, double weight) Creates an Edge with the specified source, target, direction and weight.Class<?>
Gets the edge type produced by this EdgeCreator.void
initDelegate
(EdgeCreator delegate) Sets the delegate to the specified EdgeCreator.
-
Constructor Details
-
DelegatingEdgeCreator
public DelegatingEdgeCreator()
-
-
Method Details
-
initDelegate
Sets the delegate to the specified EdgeCreator.- Parameters:
delegate
-
-
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
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.
-