|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.sourceforge.esw.graph.NodeFactory
Responsible for creation of INode instances.
"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.
The default implementation returns the ESW implementation of the
INode interface.
Examples:
MyCustomNodeFactory customFactory = new MyCustomNodeFactory(); NodeFactory.setNodeFactory( customFactory );
INode| Field Summary | |
protected static INodeFactory |
nodeFactory
The INodeFactory instance to which INode instance
creation is delegated. |
| Constructor Summary | |
NodeFactory()
|
|
| Method Summary | |
static INode |
createNode()
Creates a new empty INode instance. |
static INode |
createNode(java.lang.Object aID)
Creates a new INode instance with the specified identifier. |
static INode |
createNode(java.lang.Object aID,
java.lang.Object aValue)
Creates a new INode instance with the specified identifier
and value. |
static INodeFactory |
getNodeFactory()
Returns the INodeFactory instance being used by this
NodeFactory. |
static void |
setNodeFactory(INodeFactory aNodeFactory)
Sets the INodeFactory instance to be used by this
NodeFactory. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static INodeFactory nodeFactory
INodeFactory instance to which INode instance
creation is delegated.| Constructor Detail |
public NodeFactory()
| Method Detail |
public static INode createNode()
INode instance.INode instance.public static INode createNode(java.lang.Object aID)
INode instance with the specified identifier.aID - the identifier used by the INode instance.INode instance with the specified identifier.
public static INode createNode(java.lang.Object aID,
java.lang.Object aValue)
INode instance with the specified identifier
and value.aID - the identifier used by the INode instance.aValue - the value used by the INode instance.INode instance with the specified identifier and
value.public static void setNodeFactory(INodeFactory aNodeFactory)
INodeFactory instance to be used by this
NodeFactory.aNodeFactory - the INodeFactory instance to be used.public static INodeFactory getNodeFactory()
INodeFactory instance being used by this
NodeFactory.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||