net.sourceforge.esw.graph.factory
Interface INodeFactory

All Known Implementing Classes:
DefaultNodeFactory

public interface INodeFactory

Defines the methods for creation of INode instances.

This is the Abstract Factory of the Abstract Factory design pattern.

"Pluggable factories" allow the application to add its own custom implementations of the INode interface to the framework in a consitent, simple way. Custom implementations of the INode interface can thus be used as if they were a standard part of the framework.

Examples:

   MyCustomNodeFactory customFactory = new MyCustomNodeFactory();
   NodeFactory.setNodeFactory( customFactory );
 


Method Summary
 INode createNode()
          Creates a new empty INode instance.
 INode createNode(java.lang.Object aID)
          Creates a new INode instance with the specified identifier.
 INode createNode(java.lang.Object aID, java.lang.Object aValue)
          Creates a new INode instance with the specified identifier and value.
 

Method Detail

createNode

public INode createNode()
Creates a new empty INode instance.
Returns:
an empty INode instance.

createNode

public INode createNode(java.lang.Object aID)
Creates a new INode instance with the specified identifier.
Parameters:
aID - the identifier used by the INode instance.
Returns:
an INode instance with the specified identifier.

createNode

public INode createNode(java.lang.Object aID,
                        java.lang.Object aValue)
Creates a new INode instance with the specified identifier and value.
Parameters:
aID - the identifier used by the INode instance.
aValue - the value used by the INode instance.
Returns:
an INode instance with the specified identifier and value.


Copyright 2002 Free Software Foundation. All Rights Reserved.