Class DefaultNodeCreator
java.lang.Object
repast.simphony.context.space.graph.DefaultNodeCreator
- All Implemented Interfaces:
NodeCreator
Creates an agent / node from a Class. If the Class has a constructor with
a single String parameter, the label will be passed in the Constructor.
- Author:
- Nick Collier
-
Constructor Summary
ConstructorDescriptionDefaultNodeCreator
(Class nodeClass) Creates a DefaultNodeCreator that will create nodes/agents from the specified class. -
Method Summary
Modifier and TypeMethodDescriptioncreateNode
(String label) Creates and returns a node to be added to a network via a context.
-
Constructor Details
-
DefaultNodeCreator
Creates a DefaultNodeCreator that will create nodes/agents from the specified class.- Parameters:
nodeClass
- the class of the agents /nodes to create
-
-
Method Details
-
createNode
Creates and returns a node to be added to a network via a context.- Specified by:
createNode
in interfaceNodeCreator
- Parameters:
label
- the node label. If the node label does not exist this will be an empty string- Returns:
- the created Node.
-