Class DefaultNodeCreator

  • All Implemented Interfaces:

    public class DefaultNodeCreator
    extends Object
    implements 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.
    Nick Collier
    • Constructor Detail

      • DefaultNodeCreator

        public DefaultNodeCreator​(Class nodeClass)
        Creates a DefaultNodeCreator that will create nodes/agents from the specified class.
        nodeClass - the class of the agents /nodes to create
    • Method Detail

      • createNode

        public Object createNode​(String label)
        Creates and returns a node to be added to a network via a context.
        Specified by:
        createNode in interface NodeCreator
        label - the node label. If the node label does not exist this will be an empty string
        the created Node.